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: paraSwapWallet connector (rainbow-me#2189)
* feat: paraSwapWallet * chore: prettify * chore: prettify * chore: fix linting --------- Co-authored-by: proinsights <[email protected]>
- Loading branch information
1 parent
1785c6c
commit f93cd0e
Showing
7 changed files
with
85 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 ParaSwap Wallet support with `paraSwapWallet` 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/paraSwapWallet/paraSwapWallet.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/paraSwapWallet/paraswapWallet.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 type { Wallet } from '../../Wallet'; | ||
import type { DefaultWalletOptions } from '../../Wallet'; | ||
import { getWalletConnectConnector } from '../../getWalletConnectConnector'; | ||
|
||
export type ParaSwapWalletOptions = DefaultWalletOptions; | ||
|
||
export const paraSwapWallet = ({ | ||
projectId, | ||
walletConnectParameters, | ||
}: ParaSwapWalletOptions): Wallet => ({ | ||
id: 'paraswap', | ||
name: 'ParaSwap Wallet', | ||
iconUrl: async () => (await import('./paraSwapWallet.svg')).default, | ||
iconBackground: '#578CFC', | ||
downloadUrls: { | ||
ios: 'https://apps.apple.com/us/app/paraswap-multichain-wallet/id1584610690', | ||
mobile: 'https://paraswap.io', | ||
qrCode: 'https://paraswap.io', | ||
}, | ||
mobile: { | ||
getUri: (uri: string) => { | ||
return `paraswap://wc?uri=${encodeURIComponent(uri)}`; | ||
}, | ||
}, | ||
qrCode: { | ||
getUri: (uri: string) => uri, | ||
instructions: { | ||
learnMoreUrl: 'https://paraswap.io', | ||
steps: [ | ||
{ | ||
description: 'wallet_connectors.paraswap.qr_code.step1.description', | ||
step: 'install', | ||
title: 'wallet_connectors.paraswap.qr_code.step1.title', | ||
}, | ||
{ | ||
description: 'wallet_connectors.paraswap.qr_code.step2.description', | ||
step: 'create', | ||
title: 'wallet_connectors.paraswap.qr_code.step2.title', | ||
}, | ||
{ | ||
description: 'wallet_connectors.paraswap.qr_code.step3.description', | ||
step: 'scan', | ||
title: 'wallet_connectors.paraswap.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