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

Commit

Permalink
Support TTWallet
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Hung-Thunder committed Jun 20, 2023
1 parent 746df4f commit d7f35f5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/short-turtles-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wagmi/connectors": patch
---

Added `TTWallet` to `getInjectedName` list
1 change: 1 addition & 0 deletions packages/connectors/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type InjectedProviderFlags = {
isTokenary?: true
isTrust?: true
isTrustWallet?: true
isTTWallet?: true
isXDEFI?: true
isZerion?: true
isHaloWallet?: 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 @@ -62,6 +62,7 @@ describe.each([
{ ethereum: { isTokenary: true, isMetaMask: true }, expected: 'Tokenary' },
{ ethereum: { isTrust: true }, expected: 'Trust Wallet' },
{ ethereum: { isTrustWallet: true }, expected: 'Trust Wallet' },
{ ethereum: { isTTWallet: true }, expected: 'TTWallet' },
{ ethereum: { isXDEFI: true }, expected: 'XDEFI Wallet' },
{ ethereum: { isZerion: true }, expected: 'Zerion' },
{ ethereum: { isMetaMask: true }, expected: 'MetaMask' },
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 @@ -40,6 +40,7 @@ export function getInjectedName(ethereum?: WindowProvider) {
if (provider.isTokenPocket) return 'TokenPocket'
if (provider.isTokenary) return 'Tokenary'
if (provider.isTrust || provider.isTrustWallet) return 'Trust Wallet'
if (provider.isTTWallet) return 'TTWallet'
if (provider.isXDEFI) return 'XDEFI Wallet'
if (provider.isZerion) return 'Zerion'
if (provider.isMetaMask) return 'MetaMask'
Expand Down

0 comments on commit d7f35f5

Please sign in to comment.