From 61a90116379db70de0edafd88694514761a1b89b Mon Sep 17 00:00:00 2001 From: Manolis Liolios Date: Fri, 18 Oct 2024 23:53:05 +0300 Subject: [PATCH] Also reset accounts --- apps/wallet/src/dapp-interface/WalletStandardInterface.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/wallet/src/dapp-interface/WalletStandardInterface.ts b/apps/wallet/src/dapp-interface/WalletStandardInterface.ts index 16e874c29ed42..1d1dc2df46235 100644 --- a/apps/wallet/src/dapp-interface/WalletStandardInterface.ts +++ b/apps/wallet/src/dapp-interface/WalletStandardInterface.ts @@ -253,9 +253,11 @@ export class SuiWallet implements Wallet { }; #disconnect: StandardDisconnectMethod = async () => { + this.#accounts = []; + this.#events.emit('change', { accounts: this.accounts }); this.#send({ type: 'disconnect-app', - origin: window.location.origin, + origin: '', // origin is auto-discovered for wallet's disconnect. }); };