forked from rainbow-me/rainbowkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bestWallet connector (rainbow-me#2193)
* Add Bestwallet to RainbowKit * chore: changeset --------- Co-authored-by: PratikPatil10 <[email protected]> Co-authored-by: Daniel Sinclair <[email protected]>
- Loading branch information
1 parent
f93cd0e
commit 6393498
Showing
7 changed files
with
99 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 Best Wallet support with `bestWallet` 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
11 changes: 11 additions & 0 deletions
11
packages/rainbowkit/src/wallets/walletConnectors/bestWallet/bestWallet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions
56
packages/rainbowkit/src/wallets/walletConnectors/bestWallet/bestWallet.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,56 @@ | ||
import type { Wallet } from '../../Wallet'; | ||
import { getWalletConnectConnector } from '../../getWalletConnectConnector'; | ||
import type { DefaultWalletOptions } from './../../Wallet'; | ||
|
||
export type BestWalletOptions = DefaultWalletOptions; | ||
|
||
export const bestWallet = ({ | ||
projectId, | ||
walletConnectParameters, | ||
}: BestWalletOptions): Wallet => ({ | ||
id: 'bestWallet', | ||
name: 'Best Wallet', | ||
iconUrl: async () => (await import('./bestWallet.svg')).default, | ||
iconBackground: '#5961FF', | ||
downloadUrls: { | ||
android: | ||
'https://play.google.com/store/apps/details?id=com.bestwallet.mobile', | ||
ios: 'https://apps.apple.com/in/app/best-wallet-buy-sell-crypto/id6451312105', | ||
mobile: 'https://bestwallet.com/', | ||
qrCode: 'https://bestwallet.com/', | ||
}, | ||
|
||
mobile: { | ||
getUri: (uri: string) => { | ||
return `bw://connect/wc?uri=${encodeURIComponent(uri)}`; | ||
}, | ||
}, | ||
qrCode: { | ||
getUri: (uri: string) => uri, | ||
instructions: { | ||
learnMoreUrl: 'https://bestwallet.com/', | ||
steps: [ | ||
{ | ||
description: 'wallet_connectors.best.qr_code.step1.description', | ||
step: 'install', | ||
title: 'wallet_connectors.best.qr_code.step1.title', | ||
}, | ||
{ | ||
description: 'wallet_connectors.best.qr_code.step2.description', | ||
step: 'create', | ||
title: 'wallet_connectors.best.qr_code.step2.title', | ||
}, | ||
{ | ||
description: 'wallet_connectors.best.qr_code.step3.description', | ||
step: 'scan', | ||
title: 'wallet_connectors.best.qr_code.step3.title', | ||
}, | ||
], | ||
}, | ||
}, | ||
|
||
createConnector: getWalletConnectConnector({ | ||
projectId, | ||
walletConnectParameters, | ||
}), | ||
}); |
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