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: does not respect reloadOnDisconnect when set via injected provider #1012

Open
KosGrillis opened this issue Sep 21, 2023 · 3 comments
Open
Labels
type: bug Something isn't working

Comments

@KosGrillis
Copy link

KosGrillis commented Sep 21, 2023

Describe the bug

Disconnecting from a Dapp via Coinbase Wallet triggers a page reload when the injected provider (not SDK) has reloadOnDisconnect set to false.

Steps

  1. Retrieve injected provider:
const { ethereum } = window;
let eip1193Provider = ethereum;
if (ethereum.providers?.length) {
    ethereum.providers.forEach((p) => {
        if (p.isCoinbaseWallet) {
            eip1193Provider = p;
        }
    });
}
  1. Set reloadOnDisconnect to false:
eip1193Provider.reloadOnDisconnect = false;
  1. Disconnect from Dapp using Coinbase Wallet browser extension
  2. Page will reload

Expected behavior

Disconnecting from a Dapp via Coinbase Wallet browser extension should not reload the page if the injected provider has reloadOnDisconnect set false or undefined.

Version

No response

Additional info

No response

Desktop

No response

Smartphone

No response

@KosGrillis KosGrillis added the type: bug Something isn't working label Sep 21, 2023
@sam41306061
Copy link

@KosGrillis , is this bug still open?

@KosGrillis
Copy link
Author

@sam41306061 Yes. The bug is still present

@sam41306061
Copy link

Hey @KosGrillis , Do you have a dapp project repo that I could reference? Just to help with context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Development

No branches or pull requests

3 participants
@KosGrillis @sam41306061 and others