WalletConnect / web3modal

A single Web3 provider solution for all Wallets
https://web3modal.com
Apache License 2.0
4.69k stars 1.3k forks source link

Reordering Wallet List #812

Closed fachryadhitya closed 1 year ago

fachryadhitya commented 1 year ago

Is your feature request related to a problem? Please describe. Hi guys, I want to use the default wallet list but I cant find a way to re-order it, is there a way to re order the wallet list so I can customize it before the View All wallet?

xzilja commented 1 year ago

At the moment it is only achievable by combining custom wagmi connector config with something like allow/deny list for explorer entries (https://docs.walletconnect.com/2.0/web3modal/configuration)

But we are looking into making it easier in the future for sure 👌

fachryadhitya commented 1 year ago

thanks for the answer! another question that I don't find in the docs:

  1. Is there a way to open extension when connecting to trust wallet from desktop? because I've tried in the docs, and when I click trust wallet, the modal told me to install the extension even though I have installed it

    image
  2. We have to specify links if we want to custom wallet options, where can I got those links? https://docs.walletconnect.com/2.0/web3modal/configuration

    image

@0xAsimetriq

xzilja commented 1 year ago
  1. For trust, web3modal should pick it up and open it by default, this is what I'm getting. Do you have any other active extensions that could be conflicting? Have you added InjectedConnector to wagmi config (this one is required for extensions)

https://user-images.githubusercontent.com/3154053/211260994-43bc1f74-4f6c-4a92-9efb-585193139d49.mov

  1. desktopWallets is used to configure native desktop wallets i.e. ledger live, all these details are up to you to provide (idea here is that you know which custom wallets you want to use). To reuse entries from our explorer (https://explorer.walletconnect.com) you can use allow / deny list configs, but I think there is no way to order them atm, only exclude or include certain wallets.
fachryadhitya commented 1 year ago

yeah I have more than one injected wallet; metamask, core, and trust. Can I still open the extension if I have more than one injected wallet? I actually tried from the docs, and I choose Trust, it's still wont open for me :/

xzilja commented 1 year ago

That could be the issue. There is no way to reliably open specific one with all of them relying on window.ethereum (limitation you'll find in other similar projects as well). This is something extension wallets are currently working on (new standard).

It also behaves differently in browsers i.e. either opens just metamask or all of them at the same time.

fachryadhitya commented 1 year ago

okay then I got it, thanks for the answer, appreciate it! do you want me to close this or no because I saw that you change the label to enhancement and v2 haha

xzilja commented 1 year ago

We can keep this open 👍 As it is initially about better mechanism to order wallets, which we do need to add

fachryadhitya commented 1 year ago

hi @0xAsimetriq sorry for asking again, but how do I disable phantom wallet in default wallet list? because I don't see phantom in https://explorer.walletconnect.com

xzilja commented 1 year ago

At the moment it is not possible, as phantom (on desktop) is an injected / extension wallet which comes from manual list available here https://github.com/WalletConnect/web3modal/blob/V2/packages/ui/src/presets/EthereumPresets.ts

But this is part of the greater re-ordering related task we are working on which would bring these into cloud explorer as well, thus allowing you to use id's to allow/deny in the future, as well as order.

fachryadhitya commented 1 year ago

okay thanks man appreciate it

fachryadhitya commented 1 year ago

also this is not related to our topic here but because lately I've been playing so much with web3modal package I realized that you have a small typo here for fetchEnsName, wanted to open my first PR but I feel so shame for just contributing small typo like that hahah @0xAsimetriq

image
xzilja commented 1 year ago

@fachryadhitya Deff go ahead and open that pr 👌 Gotta get into that contributor list 😄

fachryadhitya commented 1 year ago

@fachryadhitya Deff go ahead and open that pr 👌 Gotta get into that contributor list 😄

hahah so kind, LFG