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

Commit

Permalink
feat: added isHyperPay to injected flags (#130)
Browse files Browse the repository at this point in the history
* feat: added isHyperPay to injected flags

* Update .changeset/boy-hold-crayon.md

---------

Co-authored-by: dingcxx <dc328466990@gmail.com>
Co-authored-by: awkweb <tom@meagher.co>
  • Loading branch information
3 people authored Mar 3, 2023
1 parent a85e1f1 commit d779fb3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/boy-hold-crayon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@wagmi/connectors': patch
---

Added name mapping for HyperPay.
1 change: 1 addition & 0 deletions packages/connectors/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ type InjectedProviderFlags = {
isTokenary?: true
isTrust?: true
isTrustWallet?: true
isHyperPay?: true
isXDEFI?: 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 @@ -47,6 +47,7 @@ describe.each([
{ ethereum: { isTokenary: true, isMetaMask: true }, expected: 'Tokenary' },
{ ethereum: { isTrust: true }, expected: 'Trust Wallet' },
{ ethereum: { isTrustWallet: true }, expected: 'Trust Wallet' },
{ ethereum: { isHyperPay: true }, expected: 'HyperPay Wallet' },
{ ethereum: { isMetaMask: true }, expected: 'MetaMask' },
{ ethereum: { isXDEFI: true }, expected: 'XDEFI Wallet' },
{
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 @@ -24,6 +24,7 @@ export function getInjectedName(ethereum?: Ethereum) {
if (provider.isTokenPocket) return 'TokenPocket'
if (provider.isTokenary) return 'Tokenary'
if (provider.isTrust || provider.isTrustWallet) return 'Trust Wallet'
if (provider.isHyperPay) return 'HyperPay Wallet'
if (provider.isMetaMask) return 'MetaMask'
if (provider.isXDEFI) return 'XDEFI Wallet'
}
Expand Down

0 comments on commit d779fb3

Please sign in to comment.