blocknative / web3-onboard

Client library to onboard users to web3 apps
https://onboard.blocknative.com/
MIT License
817 stars 479 forks source link

connectWallet with autoSelect disables all wallets list #2184

Open josue-palmera opened 2 months ago

josue-palmera commented 2 months ago

Current Behavior

I'm trying to autoSelect WalletConnect but when I do, I get an error that I don't have supported wallets on the browser.

Passing autoSelect to connect wallet like this

let wallets = await onboard.connectWallet({
      autoSelect: { label: 'WalletConnect', disableModals: false },
    })

or like this

let wallets = await onboard.connectWallet({
      autoSelect: 'WalletConnect',
    })

It removes our supported wallets image

A workaround is passing disableModals: true but it hides the appMetadata and we would like to still show it image

Without autoselect these are our supported wallets image

Expected Behavior

Keep the supported wallets visible when passing data to autoSelect and the modal is showing

Steps To Reproduce

  1. Add a list of supported wallets to the Onboard initialization. We are trying including WalletConnect
  2. Call onboard.connectWallet(options) where options is
    let wallets = await onboard.connectWallet({
      autoSelect: { label: 'WalletConnect', disableModals: false },
    })

    or

    let wallets = await onboard.connectWallet({
      autoSelect: 'WalletConnect',
    })
  3. Connect and see that the supported wallet disappear and show an error

What package is effected by this issue?

@web3-onboard/core

Is this a build or a runtime issue?

Runtime

Package Version

2.21.2

Node Version

20.11.1

What browsers are you seeing the problem on?

Firefox, Chrome, Safari

Relevant log output

No response

Anything else?

No response

Sanity Check