question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(web3-provider) listing desktop wallets breaks the Desktop tab on modal

See original GitHub issue

Describe the bug Using the qrcodeModalOptions: { desktopLinks: string[] } option breaks the Desktop tab on the WalletConnect modal, and nothing shows up

SDK Version (if relevant)

  • Client: JS
  • Version 1.7.8

To Reproduce

  1. Create a new WalletConnectProvider instance and pass the following qrcodeModalOptions object:
const provider = new WalletConnectProvider({
    infuraId: "27e484dcd9e3efcfd25a83a78777cdf1",
    qrcodeModalOptions: {
      desktopLinks: ["metamask"]
    }
  })

repro here: https://codesandbox.io/s/little-dream-pulm0s (notice the Desktop tab disappears)

Expected behavior desktopLinks should enable displaying a filtered list based on string array that was passed

Screenshots image

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome
  • Version 101.0.4951.54

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
bkremcommented, May 11, 2022

Hi @vphilot,

Thank you for providing the sandbox example.

The issue here seems to be that “metamask” isn’t a valid filtering option for the desktop wallets, since it’s not part of the set of all known desktop wallets, but rather part of the mobile wallets set.

The filtering works as expected when passing values of known desktop wallets, e.g.:

desktopLinks: ["ledger", "tokenary", "infinity"]

Here’s a fork of your sandbox showing the filtering with the values above:

https://codesandbox.io/s/adoring-austin-f7w2xr?file=/src/index.js

1reaction
bkremcommented, May 12, 2022

You’re right, this isn’t easily visible at the moment and something we can definitely improve in terms of the filtering options on the website’s registry. I’m adding an issue for us to add a “Desktop/Mobile” filtering option 👍

The way the modal filters this is based on whether a wallet entry has a native or a universal link (or both) defined for a given platform. E.g. for Infinity Wallet (from https://registry.walletconnect.com/api/v1/wallets):

			"mobile": {
				"native": null,
				"universal": null
			},
			"desktop": {
				"native": "infinity:",
				"universal": "https://infinitywallet.io/"
			},

thus making it a desktop-only option in the modal.

Read more comments on GitHub >

github_iconTop Results From Across the Web

(web3-provider) listing desktop wallets breaks the Desktop tab ...
Describe the bug Using the qrcodeModalOptions: { desktopLinks: string[] } option breaks the Desktop tab on the WalletConnect modal, and nothing shows up....
Read more >
WalletConnect/web3modal: A single Web3 provider ... - GitHub
A single Web3 provider solution for all Wallets. Contribute to WalletConnect/web3modal development by creating an account on GitHub.
Read more >
WalletConnect Provider | mobileLinks filter not working
Using this code on Moralis Latest Update and WalletConnect 1.6.2 seems to break the Desktop wallet selection window.
Read more >
Remix Documentation - Read the Docs
Remix Desktop - Remix Desktop's release page. ... When you create a new Workspace, a modal comes up where you choose which template...
Read more >
Best Practices - MetaMask Docs
Only the (authenticated) user can confirm the transaction, and the wallet can be a web, mobile or desktop app. URLs embedded in QR...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found