-
Notifications
You must be signed in to change notification settings - Fork 685
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: compassWallet connector (#1837)
* feat: compass wallet * refactor: chrome production link * chore: avoid exposing getInjectedConnector, optimize logo svg, update compassWallet and update docs * chore: update en_US.json * chore: update logo * chore: optimize compassWallet.svg * chore: changeset --------- Co-authored-by: Himanshu Singh <[email protected]> Co-authored-by: MK <[email protected]> Co-authored-by: Daniel Sinclair <[email protected]>
- Loading branch information
1 parent
f14120c
commit 7ab6e50
Showing
7 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rainbow-me/rainbowkit": patch | ||
--- | ||
|
||
Added Compass Wallet support with `compassWallet` wallet connector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/rainbowkit/src/wallets/walletConnectors/compassWallet/compassWallet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions
48
packages/rainbowkit/src/wallets/walletConnectors/compassWallet/compassWallet.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { Wallet } from '../../Wallet'; | ||
import { | ||
getInjectedConnector, | ||
hasInjectedProvider, | ||
} from '../../getInjectedConnector'; | ||
|
||
export const compassWallet = (): Wallet => { | ||
const isCompassInjected = hasInjectedProvider({ namespace: 'compassEvm' }); | ||
|
||
return { | ||
id: 'compass', | ||
name: 'Compass Wallet', | ||
installed: isCompassInjected, | ||
iconUrl: async () => (await import('./compassWallet.svg')).default, | ||
iconBackground: '#fff', | ||
downloadUrls: { | ||
chrome: | ||
'https://chromewebstore.google.com/detail/compass-wallet-for-sei/anokgmphncpekkhclmingpimjmcooifb', | ||
browserExtension: 'https://compasswallet.io/download', | ||
}, | ||
extension: { | ||
instructions: { | ||
learnMoreUrl: 'https://compasswallet.io/download', | ||
steps: [ | ||
{ | ||
description: | ||
'wallet_connectors.compass.extension.step1.description', | ||
step: 'install', | ||
title: 'wallet_connectors.compass.extension.step1.title', | ||
}, | ||
{ | ||
description: | ||
'wallet_connectors.compass.extension.step2.description', | ||
step: 'create', | ||
title: 'wallet_connectors.compass.extension.step2.title', | ||
}, | ||
{ | ||
description: | ||
'wallet_connectors.compass.extension.step3.description', | ||
step: 'refresh', | ||
title: 'wallet_connectors.compass.extension.step3.title', | ||
}, | ||
], | ||
}, | ||
}, | ||
createConnector: getInjectedConnector({ namespace: 'compassEvm' }), | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters