Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: missing reloadOnDisconnect option passed in to WalletSDKRelay #764

Closed
tindt-blockpass opened this issue Dec 27, 2022 · 6 comments
Closed
Assignees
Labels
state: duplicate This issue or pull request already exists type: bug Something isn't working

Comments

@tindt-blockpass
Copy link

Describe the bug

I need to disable reload on disconnect behavior, so I set it to false in my code, but it didn't not work at all.

Steps

  1. Connect to wallet.
  2. Do some stuff (sign message).
  3. Disconnect wallet.
    => The page auto reload even I set reloadOnDisconnect to false.

Expected behavior

=> The page should not reload.

Version

3.6.2

Additional info

No response

Desktop

  • OS: macOS Ventura 13.1
  • Browser: Chrome and Safari.

Smartphone

No response

@tindt-blockpass tindt-blockpass added the type: bug Something isn't working label Dec 27, 2022
@taycaldwell
Copy link
Contributor

Cannot reproduce this behavior.

Do you have a demo/example where this behavior occurs?

Working demo: https://codesandbox.io/s/complete-uw25vs

  const coinbaseWallet = new CoinbaseWalletSDK({
    appName: APP_NAME,
    appLogoUrl: APP_LOGO_URL,
    reloadOnDisconnect: false
  });

@afmfe-iul
Copy link

@taycaldwell your example works, but I've added an example where the issue is happening, since no wallet is found (none is connected, you might have to disconnect yours from codesandbox), calling disconnect refreshes the page.

@bangtoven
Copy link
Contributor

we have similar issues reported, so consolidating them into one for proper tracking. cc @vishnumad 🙏

@antonio-ivanovski
Copy link

Observing the same behavior when reloadOnDisconnect is provided as false

  1. CoinbaseWalletSDK.disconnect() - reloads the page
  2. CoinbaseWaleltProvider.disconnect() - doesn't do anything, doesn't disconnects the dapp form the wallet and it doesn't reload the page.
  3. CoinbaseWaleltProvider.close() - reloads the page
  4. Trigger disconnect from wallet - reloads the page

@antonio-ivanovski
Copy link

Added related issue (#802) to keep on mind when fixing this bug. Without it the DApp will continue thinking it is connected.

@vishnumad
Copy link
Contributor

Fixed in #574

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: duplicate This issue or pull request already exists type: bug Something isn't working
Development

No branches or pull requests

8 participants
@bangtoven @antonio-ivanovski @vishnumad @taycaldwell @afmfe-iul @tindt-blockpass and others