From d02d73fc8a3a2d4b83e35dce43e956093dfe2129 Mon Sep 17 00:00:00 2001 From: MK <53529533+magiziz@users.noreply.github.com> Date: Wed, 3 Jul 2024 00:35:46 +0100 Subject: [PATCH] fix: phantom wallet not appearing as eip6963 (#2069) --- .changeset/red-apples-know.md | 5 +++++ packages/rainbowkit/src/wallets/groupedWallets.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/red-apples-know.md diff --git a/.changeset/red-apples-know.md b/.changeset/red-apples-know.md new file mode 100644 index 0000000000..05573c5eda --- /dev/null +++ b/.changeset/red-apples-know.md @@ -0,0 +1,5 @@ +--- +"@rainbow-me/rainbowkit": patch +--- + +Resolved an issue where the Phantom wallet did not appear as an EIP-6963 connector. diff --git a/packages/rainbowkit/src/wallets/groupedWallets.ts b/packages/rainbowkit/src/wallets/groupedWallets.ts index 9bf6fd7317..3c41a493d8 100644 --- a/packages/rainbowkit/src/wallets/groupedWallets.ts +++ b/packages/rainbowkit/src/wallets/groupedWallets.ts @@ -27,7 +27,7 @@ export const isRainbowKitConnector = (wallet: WalletInstance) => { export const isEIP6963Connector = (wallet: WalletInstance) => { return !!( !wallet.isRainbowKitConnector && - wallet.icon?.startsWith('data:image') && + wallet.icon?.replace(/\n/g, '').startsWith('data:image') && wallet.uid && wallet.name );