Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
Reset temp grid on disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
dzbo committed Oct 25, 2024
1 parent 2e68af3 commit d273e90
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions composables/web3-provider/useBaseProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ const disconnect = () => {
const { removeItem } = useLocalStorage()
const { connectedProfileAddress, isWalletConnect, walletConnectProvider } =
storeToRefs(useAppStore())
const { tempGrid } = storeToRefs(useGridStore())

// disconnect WalletConnect
if (isWalletConnect.value) {
walletConnectProvider.value?.disconnect()
isWalletConnect.value = false
}

// reset connected profile address
connectedProfileAddress.value = undefined
// remove connection expiry
removeItem(STORAGE_KEY.CONNECTION_EXPIRY)
// clear temp grid for the profile
tempGrid.value = []
}

/**
Expand Down

0 comments on commit d273e90

Please sign in to comment.