near / wallet-selector

This is a wallet selector modal that allows users to interact with NEAR dApps with a selection of available wallets.
https://near.github.io/wallet-selector/
Apache License 2.0
145 stars 147 forks source link

Sign out from WalletConnect throw an error after disconnect is completed #453

Closed leomanza closed 2 years ago

leomanza commented 2 years ago

I am working on a WalletConnect + Fireblocks integration using wallet-selector v7.0.1

After I execute a sign out call and confirmed the action on Fireblocks, I received an error

Unhandled Runtime Error Error: No matching key. keychain: 69ec0d9c7d57356cdc2264fde3...

index.es.js?e35d:1 Uncaught (in promise) Error: No matching key. keychain: 69ec0d9c7d57356cdc2264fde3... at Ve.get (index.es.js?e35d:1:18596) at Ge.getSymKey (index.es.js?e35d:1:21087) at Ge.decode (index.es.js?e35d:1:20655) at D.eval (index.es.js?eb21:1:25522) at D.emit (index.es.js?e35d:1:2081) at Qe.onMessageEvent (index.es.js?e35d:1:34517) at async Qe.onProviderPayload (index.es.js?e35d:1:34400)

Seems to be an error on "@walletconnect/keyvaluestorage"

Code:

const wallet = await selector.wallet(); setIsSigningOut(true); wallet.signOut() .then((e) =>

{ setIsSigningOut(false); }

) .catch((err) =>

{ console.log("Failed to sign out"); console.error(err); setIsSigningOut(false); }

); ...

amirsaran3 commented 2 years ago

Hey @leomanza. This is an issue with the WalletConnect code.

Here is a related issue on their issues page: https://github.com/WalletConnect/walletconnect-monorepo/issues/1386.

The sign out functionality works, but it just throws the error in the console.

amirsaran3 commented 2 years ago

@leomanza Updating WalletConnect version fixed this issue. https://github.com/near/wallet-selector/pull/462

leomanza commented 2 years ago

Thanks @amirsaran3 ! I will wait until this fix get merged into main to test the sign out again

kujtimprenkuSQA commented 2 years ago

Hey, @leomanza we have published a new version v7.0.3 which includes the fix for the signout error which was being thrown in console: https://www.npmjs.com/org/near-wallet-selector Release Notes: https://github.com/near/wallet-selector/releases/tag/v7.0.3

leomanza commented 2 years ago

Thanks a lot for the heads up @kujtimprenkuSQA ! I testes on one of the dapps and the new version fixes the signout error. :)

max-mainnet commented 2 years ago

Hi @leomanza , this is Max, front-end developer from ref finance, so glad to hear that you are working on WalletConnect + Fireblocks integration using wallet-selector. I am to work on this integration too, however not too much information I got yet about how to do it, just wondering that is there any access or context I should know on fireblocks side ? I've noticed that it has on cold wallet in the app store. Really thanks if you have something to share !

leomanza commented 2 years ago

Hey @max-mainnet ! Sorry for the long delay here. Sure, I'd love to help you on that integration Let's chat on DM.