From fc7dfa202adbe0f3dc1ce8075e5b392fe9424055 Mon Sep 17 00:00:00 2001 From: Hamish Peebles Date: Tue, 17 Sep 2024 12:30:39 +0100 Subject: [PATCH] Bump SignInWithEth/Sol canisters (#6406) --- dfx.json | 8 +- .../src/components/home/SigninWithEth.svelte | 2 +- .../src/components/home/SigninWithSol.svelte | 2 +- frontend/openchat-agent/codegen.sh | 3 - .../src/services/openchatAgent.ts | 5 +- .../signInWithEthereum/candid/can.did | 106 +++++++++++------- .../services/signInWithEthereum/candid/idl.js | 47 +++++++- .../signInWithEthereum/candid/types.d.ts | 9 +- .../services/signInWithEthereum/mappers.ts | 3 +- .../signInWithEthereum.client.ts | 5 +- .../services/signInWithSolana/candid/can.did | 105 ++++++++++------- .../services/signInWithSolana/candid/idl.js | 38 ++++++- frontend/openchat-client/src/openchat.ts | 2 + .../openchat-shared/src/domain/identity.ts | 2 +- frontend/openchat-shared/src/domain/worker.ts | 1 + frontend/openchat-worker/src/worker.ts | 1 + 16 files changed, 240 insertions(+), 99 deletions(-) diff --git a/dfx.json b/dfx.json index 1ca5a2d7bf..0eab26c3b6 100644 --- a/dfx.json +++ b/dfx.json @@ -139,13 +139,13 @@ }, "sign_in_with_ethereum": { "type": "custom", - "candid": "https://github.com/kristoferlund/ic-siwe/releases/download/v0.0.6/ic_siwe_provider.did", - "wasm": "https://github.com/kristoferlund/ic-siwe/releases/download/v0.0.6/ic_siwe_provider.wasm.gz" + "candid": "https://github.com/kristoferlund/ic-siwe/releases/download/v0.1.1/ic_siwe_provider.did", + "wasm": "https://github.com/kristoferlund/ic-siwe/releases/download/v0.1.1/ic_siwe_provider.wasm.gz" }, "sign_in_with_solana": { "type": "custom", - "candid": "https://github.com/kristoferlund/ic-siws/releases/download/v0.0.1/ic_siws_provider.did", - "wasm": "https://github.com/kristoferlund/ic-siws/releases/download/v0.0.1/ic_siws_provider.wasm.gz" + "candid": "https://github.com/kristoferlund/ic-siws/releases/download/v0.0.2/ic_siws_provider.did", + "wasm": "https://github.com/kristoferlund/ic-siws/releases/download/v0.0.2/ic_siws_provider.wasm.gz" }, "website": { "build": "", diff --git a/frontend/app/src/components/home/SigninWithEth.svelte b/frontend/app/src/components/home/SigninWithEth.svelte index 67c694078d..36513569b6 100644 --- a/frontend/app/src/components/home/SigninWithEth.svelte +++ b/frontend/app/src/components/home/SigninWithEth.svelte @@ -46,7 +46,7 @@ message: prepareResponse.siweMessage, }); client - .signInWithWallet("eth", account, signResponse, assumeIdentity) + .signInWithWallet("eth", account, signResponse, prepareResponse.nonce, assumeIdentity) .then((resp) => { if (resp.kind === "success") { dispatch("connected", resp); diff --git a/frontend/app/src/components/home/SigninWithSol.svelte b/frontend/app/src/components/home/SigninWithSol.svelte index 2ad699b860..43b2845ab1 100644 --- a/frontend/app/src/components/home/SigninWithSol.svelte +++ b/frontend/app/src/components/home/SigninWithSol.svelte @@ -43,7 +43,7 @@ const signResponse = await signMessage(data); const signature = base58.encode(signResponse); await client - .signInWithWallet("sol", account, signature, assumeIdentity) + .signInWithWallet("sol", account, signature, "", assumeIdentity) .then((resp) => { if (resp.kind === "success") { dispatch("connected", resp); diff --git a/frontend/openchat-agent/codegen.sh b/frontend/openchat-agent/codegen.sh index 677742dc1b..084da9c59b 100755 --- a/frontend/openchat-agent/codegen.sh +++ b/frontend/openchat-agent/codegen.sh @@ -17,9 +17,6 @@ didc bind ../../backend/canisters/local_user_index/api/can.did -t js > ./src/ser didc bind ../../backend/canisters/market_maker/api/can.did -t ts > ./src/services/marketMaker/candid/types.d.ts didc bind ../../backend/canisters/market_maker/api/can.did -t js > ./src/services/marketMaker/candid/idl.js -didc bind ../../backend/canisters/notifications_index/api/can.did -t ts > ./src/services/notifications/candid/types.d.ts -didc bind ../../backend/canisters/notifications_index/api/can.did -t js > ./src/services/notifications/candid/idl.js - didc bind ../../backend/canisters/proposals_bot/api/can.did -t ts > ./src/services/proposalsBot/candid/types.d.ts didc bind ../../backend/canisters/proposals_bot/api/can.did -t js > ./src/services/proposalsBot/candid/idl.js diff --git a/frontend/openchat-agent/src/services/openchatAgent.ts b/frontend/openchat-agent/src/services/openchatAgent.ts index cf4a1451f1..f87d659b78 100644 --- a/frontend/openchat-agent/src/services/openchatAgent.ts +++ b/frontend/openchat-agent/src/services/openchatAgent.ts @@ -3557,11 +3557,12 @@ export class OpenChatAgent extends EventTarget { token: "eth" | "sol", address: string, signature: string, - sessionKey: Uint8Array + sessionKey: Uint8Array, + nonce: string, ): Promise { switch (token) { case "eth": - return this._signInWithEthereumClient.login(signature, address, sessionKey); + return this._signInWithEthereumClient.login(signature, address, sessionKey, nonce); case "sol": return this._signInWithSolanaClient.login(signature, address, sessionKey); } diff --git a/frontend/openchat-agent/src/services/signInWithEthereum/candid/can.did b/frontend/openchat-agent/src/services/signInWithEthereum/candid/can.did index c5758643cb..2da697736b 100644 --- a/frontend/openchat-agent/src/services/signInWithEthereum/candid/can.did +++ b/frontend/openchat-agent/src/services/signInWithEthereum/candid/can.did @@ -1,53 +1,83 @@ type Address = text; type CanisterPublicKey = PublicKey; -type Delegation = record { - pubkey : PublicKey; - targets : opt vec principal; - expiration : Timestamp; -}; -type GetAddressResponse = variant { Ok : Address; Err : text }; -type GetDelegationResponse = variant { Ok : SignedDelegation; Err : text }; -type GetPrincipalResponse = variant { Ok : Principal; Err : text }; -type LoginDetails = record { - user_canister_pubkey : CanisterPublicKey; - expiration : Timestamp; -}; -type LoginResponse = variant { Ok : LoginDetails; Err : text }; -type PrepareLoginResponse = variant { Ok : SiweMessage; Err : text }; -type Principal = vec nat8; -type PublicKey = vec nat8; +type Principal = blob; +type PublicKey = blob; +type SessionKey = PublicKey; +type SiweMessage = text; +type SiweSignature = text; +type Timestamp = nat64; +type Nonce = text; + type RuntimeFeature = variant { IncludeUriInSeed; DisableEthToPrincipalMapping; - DisablePrincipalToEthMapping; + DisablePrincipalToEthMapping }; -type SessionKey = PublicKey; + type SettingsInput = record { - uri : text; - runtime_features : opt vec RuntimeFeature; domain : text; - statement : opt text; - scheme : opt text; + uri : text; salt : text; - session_expires_in : opt nat64; - targets : opt vec text; chain_id : opt nat; + scheme : opt text; + statement : opt text; sign_in_expires_in : opt nat64; + session_expires_in : opt nat64; + targets : opt vec text; + runtime_features: opt vec RuntimeFeature; }; + +type GetAddressResponse = variant { + Ok : Address; + Err : text; +}; + +type GetDelegationResponse = variant { + Ok : SignedDelegation; + Err : text; +}; + type SignedDelegation = record { - signature : vec nat8; delegation : Delegation; + signature : blob; }; -type SiweMessage = text; -type SiweSignature = text; -type Timestamp = nat64; -service : { - get_address : (Principal) -> (GetAddressResponse) query; - get_caller_address : () -> (GetAddressResponse) query; - get_principal : (Address) -> (GetPrincipalResponse) query; - siwe_get_delegation : (Address, SessionKey, Timestamp) -> ( - GetDelegationResponse, - ) query; - siwe_login : (SiweSignature, Address, SessionKey) -> (LoginResponse); - siwe_prepare_login : (Address) -> (PrepareLoginResponse); -} \ No newline at end of file + +type Delegation = record { + pubkey : PublicKey; + expiration : Timestamp; + targets : opt vec principal; +}; + +type GetPrincipalResponse = variant { + Ok : Principal; + Err : text; +}; + +type LoginResponse = variant { + Ok : LoginDetails; + Err : text; +}; + +type LoginDetails = record { + expiration : Timestamp; + user_canister_pubkey : CanisterPublicKey; +}; + +type PrepareLoginOkResponse = record { + siwe_message: SiweMessage; + nonce : text; +}; + +type PrepareLoginResponse = variant { + Ok : PrepareLoginOkResponse; + Err : text; +}; + +service : (settings_input : SettingsInput) -> { + "get_address" : (Principal) -> (GetAddressResponse) query; + "get_caller_address" : () -> (GetAddressResponse) query; + "get_principal" : (Address) -> (GetPrincipalResponse) query; + "siwe_prepare_login" : (Address) -> (PrepareLoginResponse); + "siwe_login" : (SiweSignature, Address, SessionKey, Nonce) -> (LoginResponse); + "siwe_get_delegation" : (Address, SessionKey, Timestamp) -> (GetDelegationResponse) query; +}; \ No newline at end of file diff --git a/frontend/openchat-agent/src/services/signInWithEthereum/candid/idl.js b/frontend/openchat-agent/src/services/signInWithEthereum/candid/idl.js index 1b8a542017..d9d0a7ca71 100644 --- a/frontend/openchat-agent/src/services/signInWithEthereum/candid/idl.js +++ b/frontend/openchat-agent/src/services/signInWithEthereum/candid/idl.js @@ -1,4 +1,21 @@ export const idlFactory = ({ IDL }) => { + const RuntimeFeature = IDL.Variant({ + 'IncludeUriInSeed' : IDL.Null, + 'DisableEthToPrincipalMapping' : IDL.Null, + 'DisablePrincipalToEthMapping' : IDL.Null, + }); + const SettingsInput = IDL.Record({ + 'uri' : IDL.Text, + 'runtime_features' : IDL.Opt(IDL.Vec(RuntimeFeature)), + 'domain' : IDL.Text, + 'statement' : IDL.Opt(IDL.Text), + 'scheme' : IDL.Opt(IDL.Text), + 'salt' : IDL.Text, + 'session_expires_in' : IDL.Opt(IDL.Nat64), + 'targets' : IDL.Opt(IDL.Vec(IDL.Text)), + 'chain_id' : IDL.Opt(IDL.Nat), + 'sign_in_expires_in' : IDL.Opt(IDL.Nat64), + }); const Principal = IDL.Vec(IDL.Nat8); const Address = IDL.Text; const GetAddressResponse = IDL.Variant({ 'Ok' : Address, 'Err' : IDL.Text }); @@ -23,6 +40,7 @@ export const idlFactory = ({ IDL }) => { 'Err' : IDL.Text, }); const SiweSignature = IDL.Text; + const Nonce = IDL.Text; const CanisterPublicKey = PublicKey; const LoginDetails = IDL.Record({ 'user_canister_pubkey' : CanisterPublicKey, @@ -30,8 +48,12 @@ export const idlFactory = ({ IDL }) => { }); const LoginResponse = IDL.Variant({ 'Ok' : LoginDetails, 'Err' : IDL.Text }); const SiweMessage = IDL.Text; + const PrepareLoginOkResponse = IDL.Record({ + 'nonce' : IDL.Text, + 'siwe_message' : SiweMessage, + }); const PrepareLoginResponse = IDL.Variant({ - 'Ok' : SiweMessage, + 'Ok' : PrepareLoginOkResponse, 'Err' : IDL.Text, }); return IDL.Service({ @@ -44,11 +66,30 @@ export const idlFactory = ({ IDL }) => { ['query'], ), 'siwe_login' : IDL.Func( - [SiweSignature, Address, SessionKey], + [SiweSignature, Address, SessionKey, Nonce], [LoginResponse], [], ), 'siwe_prepare_login' : IDL.Func([Address], [PrepareLoginResponse], []), }); }; -export const init = ({ IDL }) => { return []; }; +export const init = ({ IDL }) => { + const RuntimeFeature = IDL.Variant({ + 'IncludeUriInSeed' : IDL.Null, + 'DisableEthToPrincipalMapping' : IDL.Null, + 'DisablePrincipalToEthMapping' : IDL.Null, + }); + const SettingsInput = IDL.Record({ + 'uri' : IDL.Text, + 'runtime_features' : IDL.Opt(IDL.Vec(RuntimeFeature)), + 'domain' : IDL.Text, + 'statement' : IDL.Opt(IDL.Text), + 'scheme' : IDL.Opt(IDL.Text), + 'salt' : IDL.Text, + 'session_expires_in' : IDL.Opt(IDL.Nat64), + 'targets' : IDL.Opt(IDL.Vec(IDL.Text)), + 'chain_id' : IDL.Opt(IDL.Nat), + 'sign_in_expires_in' : IDL.Opt(IDL.Nat64), + }); + return [SettingsInput]; +}; diff --git a/frontend/openchat-agent/src/services/signInWithEthereum/candid/types.d.ts b/frontend/openchat-agent/src/services/signInWithEthereum/candid/types.d.ts index d728f91e43..bac7f78cc7 100644 --- a/frontend/openchat-agent/src/services/signInWithEthereum/candid/types.d.ts +++ b/frontend/openchat-agent/src/services/signInWithEthereum/candid/types.d.ts @@ -21,7 +21,12 @@ export interface LoginDetails { } export type LoginResponse = { 'Ok' : LoginDetails } | { 'Err' : string }; -export type PrepareLoginResponse = { 'Ok' : SiweMessage } | +export type Nonce = string; +export interface PrepareLoginOkResponse { + 'nonce' : string, + 'siwe_message' : SiweMessage, +} +export type PrepareLoginResponse = { 'Ok' : PrepareLoginOkResponse } | { 'Err' : string }; export type Principal = Uint8Array | number[]; export type PublicKey = Uint8Array | number[]; @@ -57,7 +62,7 @@ export interface _SERVICE { GetDelegationResponse >, 'siwe_login' : ActorMethod< - [SiweSignature, Address, SessionKey], + [SiweSignature, Address, SessionKey, Nonce], LoginResponse >, 'siwe_prepare_login' : ActorMethod<[Address], PrepareLoginResponse>, diff --git a/frontend/openchat-agent/src/services/signInWithEthereum/mappers.ts b/frontend/openchat-agent/src/services/signInWithEthereum/mappers.ts index ca62b3b467..2850496a75 100644 --- a/frontend/openchat-agent/src/services/signInWithEthereum/mappers.ts +++ b/frontend/openchat-agent/src/services/signInWithEthereum/mappers.ts @@ -16,7 +16,8 @@ export function prepareLoginResponse(candid: ApiPrepareLoginResponse): SiwePrepa if ("Ok" in candid) { return { kind: "success", - siweMessage: candid.Ok, + siweMessage: candid.Ok.siwe_message, + nonce: candid.Ok.nonce, }; } if ("Err" in candid) { diff --git a/frontend/openchat-agent/src/services/signInWithEthereum/signInWithEthereum.client.ts b/frontend/openchat-agent/src/services/signInWithEthereum/signInWithEthereum.client.ts index 69b8456baf..1ddd19287f 100644 --- a/frontend/openchat-agent/src/services/signInWithEthereum/signInWithEthereum.client.ts +++ b/frontend/openchat-agent/src/services/signInWithEthereum/signInWithEthereum.client.ts @@ -29,11 +29,12 @@ export class SignInWithEthereumClient extends CandidService { signature: string, address: string, sessionKey: Uint8Array, + nonce: string, ): Promise { return this.handleResponse( - this.service.siwe_login(signature, address, sessionKey), + this.service.siwe_login(signature, address, sessionKey, nonce), loginResponse, - [signature, address, sessionKey], + [signature, address, sessionKey, nonce], ); } diff --git a/frontend/openchat-agent/src/services/signInWithSolana/candid/can.did b/frontend/openchat-agent/src/services/signInWithSolana/candid/can.did index 4a9d601830..583a95fab0 100644 --- a/frontend/openchat-agent/src/services/signInWithSolana/candid/can.did +++ b/frontend/openchat-agent/src/services/signInWithSolana/candid/can.did @@ -1,63 +1,88 @@ type Address = text; type CanisterPublicKey = PublicKey; -type Delegation = record { - pubkey : PublicKey; - targets : opt vec principal; - expiration : Timestamp; -}; -type GetAddressResponse = variant { Ok : Address; Err : text }; -type GetDelegationResponse = variant { Ok : SignedDelegation; Err : text }; -type GetPrincipalResponse = variant { Ok : Principal; Err : text }; -type LoginDetails = record { - user_canister_pubkey : CanisterPublicKey; - expiration : Timestamp; -}; -type LoginResponse = variant { Ok : LoginDetails; Err : text }; -type PrepareLoginResponse = variant { Ok : SiwsMessage; Err : text }; -type Principal = vec nat8; -type PublicKey = vec nat8; +type Principal = blob; +type PublicKey = blob; +type SessionKey = PublicKey; +type SiwsSignature = text; +type Timestamp = nat64; + type RuntimeFeature = variant { IncludeUriInSeed; - DisablePrincipalToSolMapping; DisableSolToPrincipalMapping; + DisablePrincipalToSolMapping }; -type SessionKey = PublicKey; + type SettingsInput = record { - uri : text; - runtime_features : opt vec RuntimeFeature; domain : text; - statement : opt text; - scheme : opt text; + uri : text; salt : text; - session_expires_in : opt nat64; - targets : opt vec text; chain_id : opt text; + scheme : opt text; + statement : opt text; sign_in_expires_in : opt nat64; + session_expires_in : opt nat64; + targets : opt vec text; + runtime_features: opt vec RuntimeFeature; }; + +type GetAddressResponse = variant { + Ok : Address; + Err : text; +}; + +type GetDelegationResponse = variant { + Ok : SignedDelegation; + Err : text; +}; + type SignedDelegation = record { - signature : vec nat8; delegation : Delegation; + signature : blob; +}; + +type Delegation = record { + pubkey : PublicKey; + expiration : Timestamp; + targets : opt vec principal; +}; + +type GetPrincipalResponse = variant { + Ok : Principal; + Err : text; +}; + +type LoginResponse = variant { + Ok : LoginDetails; + Err : text; +}; + +type LoginDetails = record { + expiration : Timestamp; + user_canister_pubkey : CanisterPublicKey; }; + type SiwsMessage = record { - uri : text; - issued_at : nat64; domain : text; + address : Address; statement : text; + uri : text; version : nat32; chain_id : text; - address : Address; nonce : text; + issued_at : nat64; expiration_time : nat64; }; -type SiwsSignature = text; -type Timestamp = nat64; -service : { - get_address : (Principal) -> (GetAddressResponse) query; - get_caller_address : () -> (GetAddressResponse) query; - get_principal : (Address) -> (GetPrincipalResponse) query; - siws_get_delegation : (Address, SessionKey, Timestamp) -> ( - GetDelegationResponse, - ) query; - siws_login : (SiwsSignature, Address, SessionKey) -> (LoginResponse); - siws_prepare_login : (Address) -> (PrepareLoginResponse); -} \ No newline at end of file + +type PrepareLoginResponse = variant { + Ok : SiwsMessage; + Err : text; +}; + +service : (settings_input : SettingsInput) -> { + "get_address" : (Principal) -> (GetAddressResponse) query; + "get_caller_address" : () -> (GetAddressResponse) query; + "get_principal" : (Address) -> (GetPrincipalResponse) query; + "siws_prepare_login" : (Address) -> (PrepareLoginResponse); + "siws_login" : (SiwsSignature, Address, SessionKey) -> (LoginResponse); + "siws_get_delegation" : (Address, SessionKey, Timestamp) -> (GetDelegationResponse) query; +}; \ No newline at end of file diff --git a/frontend/openchat-agent/src/services/signInWithSolana/candid/idl.js b/frontend/openchat-agent/src/services/signInWithSolana/candid/idl.js index a76160be07..3e914629b7 100644 --- a/frontend/openchat-agent/src/services/signInWithSolana/candid/idl.js +++ b/frontend/openchat-agent/src/services/signInWithSolana/candid/idl.js @@ -1,4 +1,21 @@ export const idlFactory = ({ IDL }) => { + const RuntimeFeature = IDL.Variant({ + 'IncludeUriInSeed' : IDL.Null, + 'DisablePrincipalToSolMapping' : IDL.Null, + 'DisableSolToPrincipalMapping' : IDL.Null, + }); + const SettingsInput = IDL.Record({ + 'uri' : IDL.Text, + 'runtime_features' : IDL.Opt(IDL.Vec(RuntimeFeature)), + 'domain' : IDL.Text, + 'statement' : IDL.Opt(IDL.Text), + 'scheme' : IDL.Opt(IDL.Text), + 'salt' : IDL.Text, + 'session_expires_in' : IDL.Opt(IDL.Nat64), + 'targets' : IDL.Opt(IDL.Vec(IDL.Text)), + 'chain_id' : IDL.Opt(IDL.Text), + 'sign_in_expires_in' : IDL.Opt(IDL.Nat64), + }); const Principal = IDL.Vec(IDL.Nat8); const Address = IDL.Text; const GetAddressResponse = IDL.Variant({ 'Ok' : Address, 'Err' : IDL.Text }); @@ -61,4 +78,23 @@ export const idlFactory = ({ IDL }) => { 'siws_prepare_login' : IDL.Func([Address], [PrepareLoginResponse], []), }); }; -export const init = ({ IDL }) => { return []; }; +export const init = ({ IDL }) => { + const RuntimeFeature = IDL.Variant({ + 'IncludeUriInSeed' : IDL.Null, + 'DisablePrincipalToSolMapping' : IDL.Null, + 'DisableSolToPrincipalMapping' : IDL.Null, + }); + const SettingsInput = IDL.Record({ + 'uri' : IDL.Text, + 'runtime_features' : IDL.Opt(IDL.Vec(RuntimeFeature)), + 'domain' : IDL.Text, + 'statement' : IDL.Opt(IDL.Text), + 'scheme' : IDL.Opt(IDL.Text), + 'salt' : IDL.Text, + 'session_expires_in' : IDL.Opt(IDL.Nat64), + 'targets' : IDL.Opt(IDL.Vec(IDL.Text)), + 'chain_id' : IDL.Opt(IDL.Text), + 'sign_in_expires_in' : IDL.Opt(IDL.Nat64), + }); + return [SettingsInput]; +}; diff --git a/frontend/openchat-client/src/openchat.ts b/frontend/openchat-client/src/openchat.ts index 3e157f2644..247c1b9fb8 100644 --- a/frontend/openchat-client/src/openchat.ts +++ b/frontend/openchat-client/src/openchat.ts @@ -6866,6 +6866,7 @@ export class OpenChat extends OpenChatAgentWorker { token: "eth" | "sol", address: string, signature: string, + nonce: string, connectWorker: boolean, ): Promise< | { kind: "success"; key: ECDSAKeyIdentity; delegation: DelegationChain } @@ -6878,6 +6879,7 @@ export class OpenChat extends OpenChatAgentWorker { token, address, signature, + nonce, sessionKey: sessionKeyDer, }); diff --git a/frontend/openchat-shared/src/domain/identity.ts b/frontend/openchat-shared/src/domain/identity.ts index c291f0e0a8..283fd8afa7 100644 --- a/frontend/openchat-shared/src/domain/identity.ts +++ b/frontend/openchat-shared/src/domain/identity.ts @@ -42,7 +42,7 @@ export type GetDelegationResponse = | { kind: "error"; error: string }; export type SiwePrepareLoginResponse = - | { kind: "success"; siweMessage: string } + | { kind: "success"; siweMessage: string; nonce: string } | { kind: "error"; error: string }; export type SiwsPrepareLoginResponse = diff --git a/frontend/openchat-shared/src/domain/worker.ts b/frontend/openchat-shared/src/domain/worker.ts index e470908f38..d22491d9e3 100644 --- a/frontend/openchat-shared/src/domain/worker.ts +++ b/frontend/openchat-shared/src/domain/worker.ts @@ -1282,6 +1282,7 @@ type LoginWithWallet = { address: string; signature: string; sessionKey: Uint8Array; + nonce: string; kind: "loginWithWallet"; }; diff --git a/frontend/openchat-worker/src/worker.ts b/frontend/openchat-worker/src/worker.ts index f12d9f44c3..88a2755bc7 100644 --- a/frontend/openchat-worker/src/worker.ts +++ b/frontend/openchat-worker/src/worker.ts @@ -1734,6 +1734,7 @@ self.addEventListener("message", (msg: MessageEvent) => payload.address, payload.signature, payload.sessionKey, + payload.nonce, ), ); break;