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
+6 -6
View File
@@ -66,8 +66,8 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => {
if (connection) {
void toast.promise(
connection
.setChannel({
channel: {
.setChannel(
new Protobuf.Channel({
role:
channel?.role === Protobuf.Channel_Role.PRIMARY
? Protobuf.Channel_Role.PRIMARY
@@ -79,18 +79,18 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => {
...data,
psk: toByteArray(data.psk ?? "")
}
}
})
})
)
.then(() =>
addChannel({
config: {
config: new Protobuf.Channel({
index: channel.index,
role: channel.role,
settings: {
...data,
psk: toByteArray(data.psk ?? "")
}
},
}),
lastInterraction: new Date(),
messages: []
})