Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@web3-onboard/fortmatic": "^2.0.14",
"@web3-onboard/gas": "^2.1.3",
"@web3-onboard/gnosis": "^2.1.5",
"@web3-onboard/injected-wallets": "^2.5.0",
"@web3-onboard/injected-wallets": "^2.6.0-alpha.2",
"@web3-onboard/keepkey": "^2.3.2",
"@web3-onboard/keystone": "^2.3.2",
"@web3-onboard/ledger": "^2.4.1-alpha.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/injected/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/injected-wallets",
"version": "2.6.0-alpha.1",
"version": "2.6.0-alpha.2",
"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.",
"keywords": [
"Ethereum",
Expand Down
3 changes: 2 additions & 1 deletion packages/injected/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ export const WALLET_NAMES: { [key: string]: string } = {
bitkeep: 'BitKeep',
sequence: 'Sequence',
core: 'Core',
enkrypt: 'Enkrypt'
enkrypt: 'Enkrypt',
zerion: 'Zerion'
}
5 changes: 5 additions & 0 deletions packages/injected/src/icons/zerion.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default `<svg width="100%" height="100%" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<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"/>
<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"/>
<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"/>
</svg>`
6 changes: 4 additions & 2 deletions packages/injected/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export enum ProviderIdentityFlag {
Bitski = 'isBitski',
Enkrypt = 'isEnkrypt',
Zeal = 'isZeal',
Phantom = 'isPhantom'
Phantom = 'isPhantom',
Zerion = 'isZerion'
}

export enum ProviderLabel {
Expand Down Expand Up @@ -93,7 +94,8 @@ export enum ProviderLabel {
Core = 'Core',
Enkrypt = 'Enkrypt',
Zeal = 'Zeal',
Phantom = 'Phantom'
Phantom = 'Phantom',
Zerion = 'Zerion'
}

export interface MeetOneProvider extends ExternalProvider {
Expand Down
15 changes: 14 additions & 1 deletion packages/injected/src/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,18 @@ const bitski: InjectedWalletModule = {
platforms: ['all']
}

const zerion: InjectedWalletModule = {
label: ProviderLabel.Zerion,
injectedNamespace: InjectedNameSpace.Ethereum,
checkProviderIdentity: ({ provider }) =>
!!provider && !!provider[ProviderIdentityFlag.Zerion],
getIcon: async () => (await import('./icons/zerion.js')).default,
getInterface: async () => ({
provider: createEIP1193Provider(window.ethereum)
}),
platforms: ['all']
}

const enkrypt: InjectedWalletModule = {
label: ProviderLabel.Enkrypt,
injectedNamespace: InjectedNameSpace.Enkrypt,
Expand Down Expand Up @@ -690,7 +702,8 @@ const wallets = [
core,
bitski,
enkrypt,
phantom
phantom,
zerion
]

export default wallets