Skip to content

Commit

Permalink
feat: add Valora wallet (#2156)
Browse files Browse the repository at this point in the history
* 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
bakoushin and DanielSinclair authored Aug 27, 2024
1 parent a8d89f1 commit 63d8386
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changeset/bright-boxes-punch.md
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
2 changes: 2 additions & 0 deletions packages/example/src/wagmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import {
tokenaryWallet,
trustWallet,
uniswapWallet,
valoraWallet,
walletConnectWallet,
xdefiWallet,
zealWallet,
Expand Down Expand Up @@ -228,6 +229,7 @@ export const config = getDefaultConfig({
tokenaryWallet,
trustWallet,
uniswapWallet,
valoraWallet,
xdefiWallet,
zealWallet,
zerionWallet,
Expand Down
17 changes: 17 additions & 0 deletions packages/rainbowkit/src/locales/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,23 @@
"description": "Tap WalletConnect then Switch to Scanner. After you scan, a connection prompt will appear for you to connect your wallet."
}
}
},

"valora": {
"qr_code": {
"step1": {
"title": "Open the Valora app",
"description": "We recommend putting Valora on your home screen for quicker access."
},
"step2": {
"title": "Create or import a wallet",
"description": "Create a new wallet or import an existing one."
},
"step3": {
"title": "Tap the scan button",
"description": "After you scan, a connection prompt will appear for you to connect your wallet."
}
}
}
}
}
2 changes: 2 additions & 0 deletions packages/rainbowkit/src/wallets/walletConnectors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import { tokenPocketWallet } from './tokenPocketWallet/tokenPocketWallet';
import { tokenaryWallet } from './tokenaryWallet/tokenaryWallet';
import { trustWallet } from './trustWallet/trustWallet';
import { uniswapWallet } from './uniswapWallet/uniswapWallet';
import { valoraWallet } from './valoraWallet/valoraWallet';
import { walletConnectWallet } from './walletConnectWallet/walletConnectWallet';
import { xdefiWallet } from './xdefiWallet/xdefiWallet';
import { zealWallet } from './zealWallet/zealWallet';
Expand Down Expand Up @@ -112,6 +113,7 @@ export {
tokenPocketWallet,
trustWallet,
uniswapWallet,
valoraWallet,
walletConnectWallet,
xdefiWallet,
zealWallet,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,
}),
});
6 changes: 6 additions & 0 deletions site/data/en-US/docs/custom-wallet-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,12 @@ import { trustWallet } from '@rainbow-me/rainbowkit/wallets';
import { uniswapWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Valora

```tsx
import { valoraWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### XDEFI Wallet

```tsx
Expand Down

0 comments on commit 63d8386

Please sign in to comment.