From a4de9f8de3ae0bf807006325b2dd14d42b91a078 Mon Sep 17 00:00:00 2001 From: Kirill Date: Thu, 10 Oct 2024 20:52:49 +0300 Subject: [PATCH] fix: displaying pure EIP-6963 wallets (#2777) --- .changeset/lucky-apples-change.md | 23 +++++++++++++++++++ .../w3m-connect-injected-widget/index.ts | 8 ++++--- 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 .changeset/lucky-apples-change.md diff --git a/.changeset/lucky-apples-change.md b/.changeset/lucky-apples-change.md new file mode 100644 index 0000000000..d318a36c6f --- /dev/null +++ b/.changeset/lucky-apples-change.md @@ -0,0 +1,23 @@ +--- +'@reown/appkit-adapter-polkadot': patch +'@reown/appkit-adapter-ethers5': patch +'@reown/appkit-adapter-ethers': patch +'@reown/appkit-adapter-solana': patch +'@reown/appkit-adapter-wagmi': patch +'@reown/appkit-utils': patch +'@reown/appkit-experimental': patch +'@reown/appkit-scaffold-ui': patch +'@reown/appkit-polyfills': patch +'@apps/laboratory': patch +'@reown/appkit': patch +'@reown/appkit-common': patch +'@reown/appkit-wallet': patch +'@reown/appkit-core': patch +'@reown/appkit-siwe': patch +'@apps/gallery': patch +'@reown/appkit-cdn': patch +'@reown/appkit-ui': patch +'@apps/demo': patch +--- + +Fix displaying pure EIP-6963 wallets. diff --git a/packages/scaffold-ui/src/partials/w3m-connect-injected-widget/index.ts b/packages/scaffold-ui/src/partials/w3m-connect-injected-widget/index.ts index 81d2b4e130..6f16a7e051 100644 --- a/packages/scaffold-ui/src/partials/w3m-connect-injected-widget/index.ts +++ b/packages/scaffold-ui/src/partials/w3m-connect-injected-widget/index.ts @@ -54,14 +54,16 @@ export class W3mConnectInjectedWidget extends LitElement { return null } - if (!ConnectionController.checkInstalled(undefined, connector.chain)) { + const walletRDNS = connector.info?.rdns + + if (!walletRDNS && !ConnectionController.checkInstalled(undefined, connector.chain)) { this.style.cssText = `display: none` return null } - if (connector.info?.rdns && ApiController.state.excludedRDNS) { - if (ApiController.state.excludedRDNS.includes(connector?.info?.rdns)) { + if (walletRDNS && ApiController.state.excludedRDNS) { + if (ApiController.state.excludedRDNS.includes(walletRDNS)) { return null } }