Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
Add name mapping for Phantom (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
bfriel committed Mar 7, 2023
1 parent daa2f1f commit 4d2c90a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/proud-trains-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@wagmi/connectors': patch
---

Added name mapping for Phantom
2 changes: 2 additions & 0 deletions packages/connectors/src/utils/getInjectedName.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ describe.each([
},
{ ethereum: { isOneInchIOSWallet: true }, expected: '1inch Wallet' },
{ ethereum: { isOneInchAndroidWallet: true }, expected: '1inch Wallet' },
{ ethereum: { isPhantom: true }, expected: 'Phantom' },
{ ethereum: { isPhantom: true, isMetaMask: true }, expected: 'Phantom' },
{ ethereum: { isPortal: true }, expected: 'Ripio Portal' },
{ ethereum: { isRainbow: true }, expected: 'Rainbow' },
{ ethereum: { isTally: true }, expected: 'Tally' },
Expand Down
1 change: 1 addition & 0 deletions packages/connectors/src/utils/getInjectedName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export function getInjectedName(ethereum?: Ethereum) {
if (provider.isOneInchIOSWallet || provider.isOneInchAndroidWallet)
return '1inch Wallet'
if (provider.isOpera) return 'Opera'
if (provider.isPhantom) return 'Phantom'
if (provider.isPortal) return 'Ripio Portal'
if (provider.isRainbow) return 'Rainbow'
if (provider.isTally) return 'Tally'
Expand Down

0 comments on commit 4d2c90a

Please sign in to comment.