-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add Valora wallet * chore: add Valora to the example * chore: add Valora to the docs * chore: add changeset * fix: update icon * chore: update website links * chore: update description * chore: tweak changeset --------- Co-authored-by: Daniel Sinclair <4412473+DanielSinclair@users.noreply.github.com>
- Loading branch information
1 parent
a8d89f1
commit 63d8386
Showing
7 changed files
with
87 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,7 @@ | ||
--- | ||
"@rainbow-me/rainbowkit": patch | ||
"example": patch | ||
"site": patch | ||
--- | ||
|
||
Added Valora support with `valorWallet` 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
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/valoraWallet/valoraWallet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions
52
packages/rainbowkit/src/wallets/walletConnectors/valoraWallet/valoraWallet.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,52 @@ | ||
import { isAndroid } from '../../../utils/isMobile'; | ||
import { DefaultWalletOptions, Wallet } from '../../Wallet'; | ||
import { getWalletConnectConnector } from '../../getWalletConnectConnector'; | ||
|
||
export type ValoraWalletOptions = DefaultWalletOptions; | ||
|
||
export const valoraWallet = ({ | ||
projectId, | ||
walletConnectParameters, | ||
}: ValoraWalletOptions): Wallet => ({ | ||
id: 'valora', | ||
name: 'Valora', | ||
iconUrl: async () => (await import('./valoraWallet.svg')).default, | ||
iconBackground: '#FFFFFF', | ||
downloadUrls: { | ||
ios: 'https://apps.apple.com/app/id1520414263?mt=8', | ||
android: 'https://play.google.com/store/apps/details?id=co.clabs.valora', | ||
mobile: 'https://valora.xyz', | ||
qrCode: 'https://valora.xyz', | ||
}, | ||
mobile: { | ||
getUri: (uri: string) => | ||
isAndroid() ? uri : `celo://wallet/wc?uri=${encodeURIComponent(uri)}`, | ||
}, | ||
qrCode: { | ||
getUri: (uri: string) => uri, | ||
instructions: { | ||
learnMoreUrl: 'https://valora.xyz/', | ||
steps: [ | ||
{ | ||
description: 'wallet_connectors.valora.qr_code.step1.description', | ||
step: 'install', | ||
title: 'wallet_connectors.valora.qr_code.step1.title', | ||
}, | ||
{ | ||
description: 'wallet_connectors.valora.qr_code.step2.description', | ||
step: 'create', | ||
title: 'wallet_connectors.valora.qr_code.step2.title', | ||
}, | ||
{ | ||
description: 'wallet_connectors.valora.qr_code.step3.description', | ||
step: 'scan', | ||
title: 'wallet_connectors.valora.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