Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
feat: add coin98 wallet detection (#454)
Browse files Browse the repository at this point in the history
* submit coin98 wallet

* chore: Added changeset

---------

Co-authored-by: chipopo <[email protected]>
  • Loading branch information
khiemsoft and huyhq4 authored Aug 9, 2023
1 parent 2e9283a commit ce84d0a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/yellow-icons-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wagmi/connectors": patch
---

Added Coin98 Wallet injected flags.
1 change: 1 addition & 0 deletions packages/connectors/src/metaMask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export class MetaMaskConnector extends InjectedConnector {
if (ethereum.isAvalanche) return
if (ethereum.isBitKeep) return
if (ethereum.isBlockWallet) return
if (ethereum.isCoin98) return
if (ethereum.isFordefi) return
if (ethereum.isMathWallet) return
if (ethereum.isOkxWallet || ethereum.isOKExWallet) return
Expand Down
1 change: 1 addition & 0 deletions packages/connectors/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type InjectedProviderFlags = {
isBitski?: true
isBlockWallet?: true
isBraveWallet?: true
isCoin98?: true
isCoinbaseWallet?: true
isDawn?: true
isDefiant?: 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 @@ -25,6 +25,7 @@ describe.each([
ethereum: { isBraveWallet: true, isMetaMask: true },
expected: 'Brave Wallet',
},
{ ethereum: { isCoin98: true }, expected: 'Coin98 Wallet' },
{ ethereum: { isCoinbaseWallet: true }, expected: 'Coinbase Wallet' },
{ ethereum: { isDawn: true }, expected: 'Dawn Wallet' },
{ ethereum: { isDefiant: true }, expected: 'Defiant' },
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 @@ -12,6 +12,7 @@ export function getInjectedName(ethereum?: WindowProvider) {
if (provider.isBitski) return 'Bitski'
if (provider.isBlockWallet) return 'BlockWallet'
if (provider.isBraveWallet) return 'Brave Wallet'
if (provider.isCoin98) return 'Coin98 Wallet'
if (provider.isCoinbaseWallet) return 'Coinbase Wallet'
if (provider.isDawn) return 'Dawn Wallet'
if (provider.isDefiant) return 'Defiant'
Expand Down

0 comments on commit ce84d0a

Please sign in to comment.