LedgerHQ / wallet-connect-live-app

https://wallet-connect-live-app.vercel.app/
7 stars 6 forks source link

Add support for empty namespaces #115

Closed cgrellard-ledger closed 1 year ago

cgrellard-ledger commented 1 year ago

📝 Description

Some dapps needs to connect without any required namespace Added the ability to connect without any accounts when there is no required namespace. In this case we hide the Accounts section in the Session Details page

We also now use the buildApprovedNamespaces util function from WalletConnect

❓ Context

See this thread for more context : https://ledger-slack-connect.slack.com/archives/C0402NGFF9U/p1692715205483189

📸 Demo

The accounts session isn't displayed when there is no accounts

Screenshot 2023-08-31 at 10 48 04

No required chain when trying to connect from https://se-sdk-dapp.vercel.app/

Screenshot 2023-08-31 at 10 47 49

🚀 Expectations to reach

Pull Requests must pass the CI and be internally validated in order to be merged.

Dapp to test : https://se-sdk-dapp.vercel.app/

Manifest to test

{
  "id": "ledger-wallet-connect",
  "name": "WalletConnect",
  "url": "https://wallet-connect-live-jf802e0em-ledgerhq.vercel.app/",
  "params": {},
  "homepageUrl": "https://walletconnect.com/",
  "icon": "https://forum.zeroqode.com/uploads/default/original/2X/e/e363c6521db27335d44c1134d230b8992792dde4.png",
  "platform": "all",
  "apiVersion": "^2.0.0",
  "manifestVersion": "1",
  "branch": "stable",
  "categories": ["bridge", "defi"],
  "currencies": [
    "ethereum",
    "polygon",
    "bsc",
    "optimism",
    "arbitrum",
    "avalanche_c_chain",
    "ethereum_goerli",
    "optimism_goerli"
  ],
  "content": {
    "shortDescription": {
      "en": "WalletConnect is an open source protocol for connecting decentralised applications to mobile wallets with QR code scanning or deep linking. V2 introduces new features, including the ability to connect to multiple dapps in parallel with multiple accounts. It's important to note that not all dapps currently support V2"
    },
    "description": {
      "en": "WalletConnect is an open source protocol for connecting decentralised applications to mobile wallets with QR code scanning or deep linking. V2 introduces new features, including the ability to connect to multiple dapps in parallel with multiple accounts. It's important to note that not all dapps currently support V2"
    }
  },
  "permissions": [
    "account.list",
    "account.request",
    "message.sign",
    "transaction.sign",
    "transaction.signAndBroadcast",
    "wallet.userId",
    "wallet.info"
  ],
  "domains": ["http://*", "https://*"]
}