ant-design / ant-design-web3

🥳 Efficient react components for building dapps easier | Connect crypto wallets and more Web3 UI components | Web3 icons | Supports Ethereum, Solana, Bitcoin, TON and others.

Home Page:https://web3.ant.design

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Add a new MoreWallet to replace the WalletConnect wallet.

yutingzhao1991 opened this issue · comments

Background

WalletConnect 严格意义上来说并不是一个钱包,它是一种通用协议,另外 WalletConnect 对于普通用户来说可能不熟悉,不理解。用户可能不知道它是所有钱包几乎都可以通过扫码来连接的方式。

Proposal

新增钱包 MoreWallet 对应的 metadata 是:

export const metadata_WalletConnect: WalletMetadata = {
  icon: <QrCodeScan />, // 这里可以给一个二维码扫描的图标
  name: 'More Wallet', // 
  name_zh_CN: '扫码连接'
  remark: 'Scan to connect more wallet',
  remark_zh_CN: '扫码连接更多钱包',
  universalProtocol: {
    link: 'https://walletconnect.com/',
  },
};

Additional context

有点像 https://docs.family.co/connectkit/try-it-out 的这种:

image

+1,wallet-connect 作为通用协议强行抽象为 Wallet 有点别扭,尤其是在 v2 版本支持非 evm 链之后。
应当把 wallet-connect 功能单独配置,并在不同链的适配器中作出对应的实现,而 metamask、coinbase 等钱包是否展示二维码取决于:

  1. 对应钱包是否有特殊的 getQrCode 实现。
  2. 如果没有特殊实现,就看有没有 wallet-connect 的 projectId 配置。