Skip to content

Commit 48df65f

Browse files
committed
feat: add zerion wallet
1 parent 4fee66e commit 48df65f

File tree

5 files changed

+26
-5
lines changed

5 files changed

+26
-5
lines changed

packages/injected/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/injected-wallets",
3-
"version": "2.5.0-alpha.2",
3+
"version": "2.5.0-alpha.3",
44
"description": "Injected wallet module for connecting browser extension and mobile wallets to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",

packages/injected/src/constants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ export const WALLET_NAMES: { [key: string]: string } = {
1616
bitkeep: 'BitKeep',
1717
sequence: 'Sequence',
1818
core: 'Core',
19-
enkrypt: 'Enkrypt'
19+
enkrypt: 'Enkrypt',
20+
zerion: 'Zerion'
2021
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default `<svg width="100%" height="100%" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
2+
<path d="M0 140.8C0 91.5154 0 66.8731 9.59143 48.0488C18.0283 31.4906 31.4906 18.0283 48.0488 9.59143C66.8731 0 91.5154 0 140.8 0H371.2C420.485 0 445.127 0 463.951 9.59143C480.509 18.0283 493.972 31.4906 502.409 48.0488C512 66.8731 512 91.5154 512 140.8V371.2C512 420.485 512 445.127 502.409 463.951C493.972 480.509 480.509 493.972 463.951 502.409C445.127 512 420.485 512 371.2 512H140.8C91.5154 512 66.8731 512 48.0488 502.409C31.4906 493.972 18.0283 480.509 9.59143 463.951C0 445.127 0 420.485 0 371.2V140.8Z" fill="#2962EF"/>
3+
<path d="M111.048 128C102.274 128 98.8931 138.85 106.256 143.382L290.443 254.441C295.034 257.267 301.157 256.15 304.319 251.909L385.301 145.594C390.807 138.208 385.244 128 375.713 128H111.048Z" fill="white"/>
4+
<path d="M400.538 384C409.311 384 412.78 373.092 405.419 368.561L221.178 257.516C216.587 254.69 210.612 255.948 207.452 260.188L126.312 366.482C120.808 373.866 126.545 384 136.074 384H400.538Z" fill="white"/>
5+
</svg>`

packages/injected/src/types.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ export enum ProviderIdentityFlag {
5050
Opera = 'isOpera',
5151
Bitski = 'isBitski',
5252
Enkrypt = 'isEnkrypt',
53-
Phantom = 'isPhantom'
53+
Phantom = 'isPhantom',
54+
Zerion = 'isZerion'
5455
}
5556

5657
export enum ProviderLabel {
@@ -91,7 +92,8 @@ export enum ProviderLabel {
9192
Sequence = 'Sequence',
9293
Core = 'Core',
9394
Enkrypt = 'Enkrypt',
94-
Phantom = 'Phantom'
95+
Phantom = 'Phantom',
96+
Zerion = 'Zerion'
9597
}
9698

9799
export interface MeetOneProvider extends ExternalProvider {

packages/injected/src/wallets.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,18 @@ const bitski: InjectedWalletModule = {
587587
platforms: ['all']
588588
}
589589

590+
const zerion: InjectedWalletModule = {
591+
label: ProviderLabel.Zerion,
592+
injectedNamespace: InjectedNameSpace.Ethereum,
593+
checkProviderIdentity: ({ provider }) =>
594+
!!provider && !!provider[ProviderIdentityFlag.Zerion],
595+
getIcon: async () => (await import('./icons/zerion.js')).default,
596+
getInterface: async () => ({
597+
provider: createEIP1193Provider(window.ethereum)
598+
}),
599+
platforms: ['all']
600+
}
601+
590602
const enkrypt: InjectedWalletModule = {
591603
label: ProviderLabel.Enkrypt,
592604
injectedNamespace: InjectedNameSpace.Enkrypt,
@@ -677,7 +689,8 @@ const wallets = [
677689
core,
678690
bitski,
679691
enkrypt,
680-
phantom
692+
phantom,
693+
zerion
681694
]
682695

683696
export default wallets

0 commit comments

Comments
 (0)