-
Notifications
You must be signed in to change notification settings - Fork 619
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add Desig Wallet * feat: add Desig Wallet * feat: add Desig Wallet * feat: add Desig Wallet * minify logo 28x28 * Alphabetize and check whether the window exists * fix: i18n * chore: changeset * fix: merge conflict --------- Co-authored-by: thiennv-qng <81727176+thiennv-qng@users.noreply.github.com>
- Loading branch information
1 parent
b84a4a7
commit b0022ae
Showing
7 changed files
with
127 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,23 @@ | ||
--- | ||
"@rainbow-me/rainbowkit": patch | ||
--- | ||
|
||
Desig Wallet support | ||
|
||
**Example usage** | ||
|
||
```ts | ||
import { | ||
getDefaultWallets, | ||
connectorsForWallets, | ||
} from '@rainbow-me/rainbowkit'; | ||
import { desigWallet } from '@rainbow-me/rainbowkit/wallets'; | ||
const { wallets } = getDefaultWallets({ appName, chains, projectId }); | ||
const connectors = connectorsForWallets([ | ||
...wallets, | ||
{ | ||
groupName: 'Other', | ||
wallets: [desigWallet({ chains })], | ||
}, | ||
]); | ||
``` |
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/desigWallet/desigWallet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions
72
packages/rainbowkit/src/wallets/walletConnectors/desigWallet/desigWallet.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,72 @@ | ||
import type { InjectedConnectorOptions } from '@wagmi/core/connectors/injected'; | ||
import { InjectedConnector } from 'wagmi/connectors/injected'; | ||
import { Chain } from '../../../components/RainbowKitProvider/RainbowKitChainContext'; | ||
import { Wallet } from '../../Wallet'; | ||
|
||
export interface DesigWalletOptions { | ||
chains: Chain[]; | ||
} | ||
|
||
export const desigWallet = ({ | ||
chains, | ||
...options | ||
}: DesigWalletOptions & InjectedConnectorOptions): Wallet => { | ||
return { | ||
id: 'desig', | ||
name: 'Desig Wallet', | ||
iconUrl: async () => (await import('./desigWallet.svg')).default, | ||
iconBackground: '#ffffff', | ||
installed: | ||
(typeof window !== 'undefined' && !!(window as any)?.desig?.ethereum) || | ||
undefined, | ||
downloadUrls: { | ||
android: 'https://play.google.com/store/apps/details?id=io.desig.app', | ||
ios: 'https://apps.apple.com/app/desig-wallet/id6450106028', | ||
qrCode: 'https://desig.io', | ||
mobile: 'https://desig.io', | ||
browserExtension: | ||
'https://chrome.google.com/webstore/detail/desig-wallet/panpgppehdchfphcigocleabcmcgfoca', | ||
}, | ||
|
||
createConnector: () => { | ||
const getProvider = () => | ||
typeof window !== 'undefined' | ||
? (window as any).desig?.ethereum | ||
: undefined; | ||
|
||
const connector = new InjectedConnector({ | ||
chains, | ||
options: { getProvider, ...options }, | ||
}); | ||
|
||
return { | ||
connector, | ||
extension: { | ||
instructions: { | ||
steps: [ | ||
{ | ||
description: | ||
'wallet_connectors.desig.extension.step1.description', | ||
step: 'install', | ||
title: 'wallet_connectors.desig.extension.step1.title', | ||
}, | ||
{ | ||
description: | ||
'wallet_connectors.desig.extension.step2.description', | ||
step: 'create', | ||
title: 'wallet_connectors.desig.extension.step2.title', | ||
}, | ||
{ | ||
description: | ||
'wallet_connectors.desig.extension.step3.description', | ||
step: 'refresh', | ||
title: 'wallet_connectors.desig.extension.step3.title', | ||
}, | ||
], | ||
learnMoreUrl: 'https://desig.io', | ||
}, | ||
}, | ||
}; | ||
}, | ||
}; | ||
}; |
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
b0022ae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
rainbowkit-site – ./
v1-rainbowkit.vercel.app
rainbowkit.vercel.app
rainbowkit-site-rainbowdotme.vercel.app
rainbowkit-site-git-main-rainbowdotme.vercel.app
v2-rainbowkit.vercel.app
rainbowkit.com
www.rainbowkit.com
b0022ae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
rainbowkit-example – ./
rainbowkit-example.vercel.app
rainbowkit-example-git-main-rainbowdotme.vercel.app
rainbowkit-example-rainbowdotme.vercel.app