Skip to content

Commit

Permalink
feature: inject(onekey wallet) (#3197)
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteZhang1024 authored Dec 7, 2023
1 parent 194ddf7 commit e8f7bcb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/perfect-schools-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wagmi/connectors": patch
---

Added OneKey Wallet to injected connector flags.
1 change: 1 addition & 0 deletions packages/connectors/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ type InjectedProviderFlags = {
isOKExWallet?: true
isOneInchAndroidWallet?: true
isOneInchIOSWallet?: true
isOneKey?: true
isOpera?: true
isPhantom?: true
isPortal?: true
Expand Down
1 change: 1 addition & 0 deletions packages/connectors/src/utils/getInjectedName.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ describe.each([
{ ethereum: { isNovaWallet: true }, expected: 'Nova Wallet' },
{ ethereum: { isOneInchIOSWallet: true }, expected: '1inch Wallet' },
{ ethereum: { isOneInchAndroidWallet: true }, expected: '1inch Wallet' },
{ ethereum: { isOneKey: true }, expected: 'OneKey Wallet' },
{ ethereum: { isPhantom: true }, expected: 'Phantom' },
{ ethereum: { isPhantom: true, isMetaMask: true }, expected: 'Phantom' },
{ ethereum: { isPortal: true }, expected: 'Ripio Portal' },
Expand Down
1 change: 1 addition & 0 deletions packages/connectors/src/utils/getInjectedName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export function getInjectedName(ethereum?: WindowProvider) {
if (provider.isOkxWallet || provider.isOKExWallet) return 'OKX Wallet'
if (provider.isOneInchIOSWallet || provider.isOneInchAndroidWallet)
return '1inch Wallet'
if (provider.isOneKey) return 'OneKey Wallet'
if (provider.isOpera) return 'Opera'
if (provider.isPhantom) return 'Phantom'
if (provider.isPortal) return 'Ripio Portal'
Expand Down

1 comment on commit e8f7bcb

@vercel
Copy link

@vercel vercel bot commented on e8f7bcb Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.