Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
oneInchWallet
(1inch Wallet) (#1876)
* feat: oneInchWallet * fix: 1inch svg * fix: bitverse, bybit --------- Co-authored-by: Magomed Khamidov <53529533+KosmosKey@users.noreply.github.com> Co-authored-by: Daniel Sinclair <d@niel.nyc>
- Loading branch information
1 parent
34419b5
commit 5c60239
Showing
9 changed files
with
87 additions
and
2 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 1inch Wallet support with `oneInchWallet` 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
2 changes: 1 addition & 1 deletion
2
packages/rainbowkit/src/wallets/walletConnectors/bitverseWallet/bitverseWallet.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion
2
packages/rainbowkit/src/wallets/walletConnectors/bybitWallet/bybitWallet.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/oneInchWallet/oneInchWallet.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions
50
packages/rainbowkit/src/wallets/walletConnectors/oneInchWallet/oneInchWallet.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,50 @@ | ||
import { DefaultWalletOptions, Wallet } from '../../Wallet'; | ||
import { getWalletConnectConnector } from '../../getWalletConnectConnector'; | ||
|
||
export type OneInchWalletOptions = DefaultWalletOptions; | ||
|
||
export const oneInchWallet = ({ | ||
projectId, | ||
walletConnectParameters, | ||
}: OneInchWalletOptions): Wallet => ({ | ||
id: '1inch', | ||
name: '1inch Wallet', | ||
iconUrl: async () => (await import('./oneInchWallet.svg')).default, | ||
iconBackground: '#fff', | ||
downloadUrls: { | ||
android: 'https://play.google.com/store/apps/details?id=io.oneinch.android', | ||
ios: 'https://apps.apple.com/us/app/1inch-crypto-defi-wallet/id1546049391', | ||
mobile: 'https://1inch.io/wallet', | ||
qrCode: 'https://1inch.io/wallet', | ||
}, | ||
mobile: { | ||
getUri: (uri: string) => `oneinch://wc?uri=${encodeURIComponent(uri)}`, | ||
}, | ||
qrCode: { | ||
getUri: (uri: string) => uri, | ||
instructions: { | ||
learnMoreUrl: 'https://1inch.io/wallet', | ||
steps: [ | ||
{ | ||
description: 'wallet_connectors.1inch.qr_code.step1.description', | ||
step: 'install', | ||
title: 'wallet_connectors.1inch.qr_code.step1.title', | ||
}, | ||
{ | ||
description: 'wallet_connectors.1inch.qr_code.step2.description', | ||
step: 'create', | ||
title: 'wallet_connectors.1inch.qr_code.step2.title', | ||
}, | ||
{ | ||
description: 'wallet_connectors.1inch.qr_code.step3.description', | ||
step: 'scan', | ||
title: 'wallet_connectors.1inch.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