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

UI attempts to display even when not connected #2026

Open
1 task done
KarandeepSWranch opened this issue Dec 14, 2023 · 0 comments
Open
1 task done

UI attempts to display even when not connected #2026

KarandeepSWranch opened this issue Dec 14, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@KarandeepSWranch
Copy link

Current Behavior

With the following onboard init configuration:

containerElements: {
    accountCenter: '...'
}

The UI for connected state is displayed whether you have any wallets connected or not.

Reproduction: https://github.com/KarandeepSWranch/sandbox-web3onboard

Expected Behavior

When you are not connected to any wallets, the UI should not display. It should discard and/or hide itself.

Steps To Reproduce

  1. Run the linked repo
  2. You'll notice the Web3Onboard UI is displayed as soon as it is initialized
  3. You'll also notice you can interact with the UI (even though certain actions will do nothing since you are not connected to any wallets)
  4. Connect wallet
  5. When disconnecting all wallets using the UI, you'll notice that the 'disconnect wallets' modal will persist on your screen

What package is effected by this issue?

@web3-onboard/core

Is this a build or a runtime issue?

Runtime

Package Version

v2.21.2

Node Version

v18.18.1

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

Relevant log output

No response

Anything else?

This works fine when containerElements.accountCenter is not set. The UI will hide when you've disconnected, and appear when connected.

Sanity Check

  • If this is a build issue, I have included my build config. If this is a runtime issue, I have included reproduction steps and/or a Minimal, Reproducible Example.
@KarandeepSWranch KarandeepSWranch added the bug Something isn't working label Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants