coinbase-wallet-sdk
coinbase-wallet-sdk copied to clipboard
fix: pass reloadOnDisconnect to WalletSDKRelay
Summary
Hey @jeongmincho and team, thanks for responding to feedback on this feature ❤️
This is related to: https://github.com/coinbase/coinbase-wallet-sdk/pull/542
How did you test your changes?
Local test app
btw @jeongmincho, how does this work in the context of the coinbase wallet browser extension? does the extension use the SDK, and will it be updated to pass reloadOnDisconnect
as false
to the SDK?
@RyanTimesTen @petejkim @ljharb @iamseth @smazhara Any updates?
https://github.com/coinbase/coinbase-wallet-sdk/issues/399#issuecomment-1199186223
Waiting for updates here 🙏
hey @RyanTimesTen! so sorry for the late response here. yes, if you pass in reloadOnDisconnect = false
into the SDK, the current setup prevents reload on a user disconnecting. then, you can detect the disconnect event via accountsChanged = []
and handle it accordingly on the dapp.
there's some code that isn't visible on your end due to the integration happening on our wallet codebase. was there anything in particular that wasn't working? cc: @Pasha8914 @agmitron
hey @jeongmincho, this isn't working as expected. this is my user authentication flow:
- (my app) display custom coinbase qr code
- scan qr code with coinbase wallet
- (my app) request signature from wallet
- reject signature request
- (my app) disconnect coinbase session since signature was rejected
- reload occurs
i would expect the reload to not occur. am i missing something?
mhm interesting, @RyanTimesTen do you mind providing us a couple details:
- what version of the SDK is implemented in your dapp
- what coinbase wallet app mobile version you are using
- what parameters you're passing into the SDK for
reloadondisconnect
- how you are handling the
accountsChanged
event and if there's any reload happening on the dapp logic?
i just tested the following flow and it works:
- go to https://app.uniswap.org/#/swap?chain=mainnet (disable CB Wallet extension)
- scan the QR code provided on the modal flow with CB wallet mobile
- disconnect from the dapp on the CB wallet mobile
- no reload is triggered
let me know, thanks!
@jeongmincho can you take a look to see whether we can close this?
Hey guys, sorry for dropping comms here. The issue I'm talking about can be seen when triggering disconnect via the SDK, as opposed to the wallet triggering the disconnect. i can put together a repro if that would be helpful
thanks, there seems to be a bug in the relay implementation as raised here and by others. @vishnumad will be helping address this issue and close it out
Review Error for vishnumad @ 2023-01-19 01:54:57 UTC User failed mfa authentication, see go/mfa-help