Compat with latest JS lib

This commit is contained in:
Sacha Weatherstone
2023-01-19 19:46:29 +10:00
parent 8ddb900f81
commit d538ba5a9d
51 changed files with 800 additions and 1027 deletions
+3 -3
View File
@@ -32,13 +32,13 @@ export const QRDialog = ({
.filter((channel) => selectedChannels.includes(channel.index))
.map((channel) => channel.settings)
.filter((ch): ch is Protobuf.ChannelSettings => !!ch);
const encoded = Protobuf.ChannelSet.toBinary(
Protobuf.ChannelSet.create({
const encoded = new Protobuf.ChannelSet(
new Protobuf.ChannelSet({
loraConfig,
settings: channelsToEncode
})
);
const base64 = fromByteArray(encoded)
const base64 = fromByteArray(encoded.toBinary())
.replace(/=/g, "")
.replace(/\+/g, "-")
.replace(/\//g, "_");