File tree Expand file tree Collapse file tree 4 files changed +19
-6
lines changed
web/ui/ConnectWallet/Modal Expand file tree Collapse file tree 4 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " thirdweb " : patch
3+ ---
4+
5+ Filter out AGW from searchable wallets (needs explicit adding)
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212import type { Chain } from "../../../../chains/types.js" ;
1313import type { ThirdwebClient } from "../../../../client/client.js" ;
1414import walletInfos from "../../../../wallets/__generated__/wallet-infos.js" ;
15+ import { NON_SEARCHABLE_WALLETS } from "../../../../wallets/constants.js" ;
1516import type { Wallet } from "../../../../wallets/interfaces/wallet.js" ;
1617import { createWallet } from "../../../../wallets/native/create-wallet.js" ;
1718import type { WalletId } from "../../../../wallets/wallet-types.js" ;
@@ -100,10 +101,7 @@ export function AllWalletsList(
100101 . filter (
101102 ( info ) => ! externalWallets . find ( ( wallet ) => wallet . id === info . id ) ,
102103 )
103- . filter (
104- ( info ) =>
105- info . id !== "inApp" && info . id !== "embedded" && info . id !== "smart" ,
106- )
104+ . filter ( ( info ) => ! NON_SEARCHABLE_WALLETS . includes ( info . id ) )
107105 . filter ( ( info ) => info . hasMobileSupport ) ;
108106
109107 const fuse = new Fuse ( filteredWallets , {
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import Fuse from "fuse.js";
55import { useMemo , useRef , useState } from "react" ;
66import type { ThirdwebClient } from "../../../../../client/client.js" ;
77import walletInfos from "../../../../../wallets/__generated__/wallet-infos.js" ;
8+ import { NON_SEARCHABLE_WALLETS } from "../../../../../wallets/constants.js" ;
89import { createWallet } from "../../../../../wallets/create-wallet.js" ;
910import type { Wallet } from "../../../../../wallets/interfaces/wallet.js" ;
1011import { useCustomTheme } from "../../../../core/design-system/CustomThemeProvider.js" ;
@@ -39,8 +40,7 @@ function AllWalletsUI(props: {
3940
4041 const walletList = useMemo ( ( ) => {
4142 return walletInfos . filter (
42- ( info ) =>
43- info . id !== "inApp" && info . id !== "embedded" && info . id !== "smart" ,
43+ ( info ) => ! NON_SEARCHABLE_WALLETS . includes ( info . id ) ,
4444 ) ;
4545 } , [ ] ) ;
4646
Original file line number Diff line number Diff line change 1+ import type { WalletId } from "./wallet-types.js" ;
2+
13// Constants for most common wallets
24export const COINBASE = "com.coinbase.wallet" ;
35export const METAMASK = "io.metamask" ;
46export const RAINBOW = "me.rainbow" ;
57export const ZERION = "io.zerion.wallet" ;
8+
9+ // Wallet IDs that should not appear in searchable wallet lists
10+ export const NON_SEARCHABLE_WALLETS : WalletId [ ] = [
11+ "inApp" ,
12+ "embedded" ,
13+ "smart" ,
14+ "xyz.abs" ,
15+ ] ;
You can’t perform that action at this time.
0 commit comments