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

Commit

Permalink
feat: added isRainbow flag to InjectedConnector (#53)
Browse files Browse the repository at this point in the history
* feat: added support for Rainbow injected provider

* chore: update changeset

* chore: update @wagmi/core

Co-authored-by: Daniel Sinclair <[email protected]>
  • Loading branch information
jxom and DanielSinclair authored Jan 10, 2023
1 parent e7b150a commit be4add2
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 65 deletions.
5 changes: 5 additions & 0 deletions .changeset/healthy-crews-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@wagmi/connectors': patch
---

Added `isRainbow` flag to `InjectedConnector`.
2 changes: 1 addition & 1 deletion packages/connectors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"eventemitter3": "^4.0.7"
},
"devDependencies": {
"@wagmi/core": "^0.8.0",
"@wagmi/core": "^0.8.12",
"ethers": "^5.7.2"
},
"type": "module",
Expand Down
1 change: 1 addition & 0 deletions packages/connectors/src/utils/getInjectedName.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe.each([
{ ethereum: { isOneInchIOSWallet: true }, expected: '1inch Wallet' },
{ ethereum: { isOneInchAndroidWallet: true }, expected: '1inch Wallet' },
{ ethereum: { isPortal: true }, expected: 'Ripio Portal' },
{ ethereum: { isRainbow: true }, expected: 'Rainbow' },
{ ethereum: { isTally: true }, expected: 'Tally' },
{
ethereum: { isTokenPocket: true, isMetaMask: true },
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 @@ -16,6 +16,7 @@ export function getInjectedName(ethereum?: Ethereum) {
return '1inch Wallet'
if (provider.isOpera) return 'Opera'
if (provider.isPortal) return 'Ripio Portal'
if (provider.isRainbow) return 'Rainbow'
if (provider.isTally) return 'Tally'
if (provider.isTokenPocket) return 'TokenPocket'
if (provider.isTokenary) return 'Tokenary'
Expand Down
Loading

0 comments on commit be4add2

Please sign in to comment.