Skip to content

Commit

Permalink
fix: remove session when disconnected
Browse files Browse the repository at this point in the history
  • Loading branch information
dawidsowardx committed May 13, 2024
1 parent 09851db commit 73d0dd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/connector-extension/connector-extension-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ export const ConnectorExtensionClient = (

return {
send: sendWalletInteraction,
disconnect: () => {
storage.clear()
},
destroy: () => {
subscription.unsubscribe()
removeEventListener(eventType.incomingMessage, handleIncomingMessage)
Expand Down
1 change: 1 addition & 0 deletions src/radix-dapp-toolkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export const RadixDappToolkit = (
if (item.showCancel) walletClient.cancelRequest(item.id)
})
stateClient.reset()
connectorExtensionClient.disconnect()
walletClient.resetRequestItems()
connectButtonClient.disconnect()
if (onDisconnect) onDisconnect()
Expand Down

0 comments on commit 73d0dd4

Please sign in to comment.