-
Notifications
You must be signed in to change notification settings - Fork 685
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: kaikasWallet * chore: update download urls * feat: klaytn chain * chore: tweak * fix: alphabetic order * fix: alphabetic order * chore: format * chore: optimize kaikasWallet.svg and update wallet title name * chore: remove old changeset * chore: update and optimize kaikasWallet.svg * chore: alphabetical * chore: alphabetical * chore: resize klaytn.svg --------- Co-authored-by: Magomed Khamidov <[email protected]> Co-authored-by: Daniel Sinclair <[email protected]>
- Loading branch information
1 parent
ec41346
commit b11118f
Showing
10 changed files
with
178 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 Kaikas Wallet support with `kaikasWallet` wallet connector and added `klaytn` chain with `klaytnBaobab` testnet support. |
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/components/RainbowKitProvider/chainIcons/klaytn.svg
Loading
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
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/kaikasWallet/kaikasWallet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
99 changes: 99 additions & 0 deletions
99
packages/rainbowkit/src/wallets/walletConnectors/kaikasWallet/kaikasWallet.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,99 @@ | ||
import { DefaultWalletOptions, Wallet } from '../../Wallet'; | ||
import { | ||
getInjectedConnector, | ||
hasInjectedProvider, | ||
} from '../../getInjectedConnector'; | ||
import { getWalletConnectConnector } from '../../getWalletConnectConnector'; | ||
|
||
export type KaikasWalletOptions = DefaultWalletOptions; | ||
|
||
export const kaikasWallet = ({ | ||
projectId, | ||
walletConnectParameters, | ||
}: KaikasWalletOptions): Wallet => { | ||
const isKaikasWalletInjected = hasInjectedProvider({ | ||
namespace: 'klaytn', | ||
}); | ||
|
||
const shouldUseWalletConnect = !isKaikasWalletInjected; | ||
|
||
const getUri = (uri: string) => { | ||
return `kaikas://walletconnect?uri=${encodeURIComponent(uri)}`; | ||
}; | ||
|
||
return { | ||
id: 'kaikas', | ||
name: 'Kaikas Wallet', | ||
iconUrl: async () => (await import('./kaikasWallet.svg')).default, | ||
installed: isKaikasWalletInjected || undefined, | ||
iconBackground: '#fff', | ||
downloadUrls: { | ||
chrome: | ||
'https://chromewebstore.google.com/detail/kaikas/jblndlipeogpafnldhgmapagcccfchpi', | ||
browserExtension: 'https://app.kaikas.io', | ||
qrCode: 'https://app.kaikas.io', | ||
ios: 'https://apps.apple.com/us/app/kaikas-mobile-crypto-wallet/id1626107061', | ||
android: 'https://play.google.com/store/apps/details?id=io.klutch.wallet', | ||
mobile: 'https://app.kaikas.io', | ||
}, | ||
mobile: { getUri: shouldUseWalletConnect ? getUri : undefined }, | ||
qrCode: shouldUseWalletConnect | ||
? { | ||
getUri: (uri: string) => uri, | ||
instructions: { | ||
learnMoreUrl: 'https://kaikas.io', | ||
steps: [ | ||
{ | ||
description: | ||
'wallet_connectors.kaikas.qr_code.step1.description', | ||
step: 'install', | ||
title: 'wallet_connectors.kaikas.qr_code.step1.title', | ||
}, | ||
{ | ||
description: | ||
'wallet_connectors.kaikas.qr_code.step2.description', | ||
step: 'create', | ||
title: 'wallet_connectors.kaikas.qr_code.step2.title', | ||
}, | ||
{ | ||
description: | ||
'wallet_connectors.kaikas.qr_code.step3.description', | ||
step: 'refresh', | ||
title: 'wallet_connectors.kaikas.qr_code.step3.title', | ||
}, | ||
], | ||
}, | ||
} | ||
: undefined, | ||
extension: { | ||
instructions: { | ||
learnMoreUrl: 'https://kaikas.io', | ||
steps: [ | ||
{ | ||
description: 'wallet_connectors.kaikas.extension.step1.description', | ||
step: 'install', | ||
title: 'wallet_connectors.kaikas.extension.step1.title', | ||
}, | ||
{ | ||
description: 'wallet_connectors.kaikas.extension.step2.description', | ||
step: 'create', | ||
title: 'wallet_connectors.kaikas.extension.step2.title', | ||
}, | ||
{ | ||
description: 'wallet_connectors.kaikas.extension.step3.description', | ||
step: 'refresh', | ||
title: 'wallet_connectors.kaikas.extension.step3.title', | ||
}, | ||
], | ||
}, | ||
}, | ||
createConnector: shouldUseWalletConnect | ||
? getWalletConnectConnector({ | ||
projectId, | ||
walletConnectParameters, | ||
}) | ||
: getInjectedConnector({ | ||
namespace: 'klaytn', | ||
}), | ||
}; | ||
}; |
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