From 06cc1b4e5f504a774859c144e4e8149bce87918a Mon Sep 17 00:00:00 2001 From: S2kael <41369298+S2kael@users.noreply.github.com> Date: Wed, 9 Aug 2023 11:12:55 +0700 Subject: [PATCH] feat: add SubWallet wallet (#459) --- .changeset/calm-swans-worry.md | 5 +++++ packages/connectors/src/types.ts | 1 + packages/connectors/src/utils/getInjectedName.test.ts | 1 + packages/connectors/src/utils/getInjectedName.ts | 1 + 4 files changed, 8 insertions(+) create mode 100644 .changeset/calm-swans-worry.md diff --git a/.changeset/calm-swans-worry.md b/.changeset/calm-swans-worry.md new file mode 100644 index 00000000..04cde68e --- /dev/null +++ b/.changeset/calm-swans-worry.md @@ -0,0 +1,5 @@ +--- +"@wagmi/connectors": patch +--- + +Add SubWallet wallet diff --git a/packages/connectors/src/types.ts b/packages/connectors/src/types.ts index c890f72e..e8e16973 100644 --- a/packages/connectors/src/types.ts +++ b/packages/connectors/src/types.ts @@ -46,6 +46,7 @@ type InjectedProviderFlags = { isRabby?: true isRainbow?: true isStatus?: true + isSubWallet?: true isTalisman?: true isTally?: true isTokenPocket?: true diff --git a/packages/connectors/src/utils/getInjectedName.test.ts b/packages/connectors/src/utils/getInjectedName.test.ts index f34d87fd..a2588b4d 100644 --- a/packages/connectors/src/utils/getInjectedName.test.ts +++ b/packages/connectors/src/utils/getInjectedName.test.ts @@ -58,6 +58,7 @@ describe.each([ { ethereum: { isRainbow: true }, expected: 'Rainbow' }, { ethereum: { isStatus: true }, expected: 'Status' }, { ethereum: { isTalisman: true }, expected: 'Talisman' }, + { ethereum: { isSubWallet: true }, expected: 'SubWallet' }, { ethereum: { isTally: true }, expected: 'Taho' }, { ethereum: { isTokenPocket: true, isMetaMask: true }, diff --git a/packages/connectors/src/utils/getInjectedName.ts b/packages/connectors/src/utils/getInjectedName.ts index 310d764e..eea7a4d8 100644 --- a/packages/connectors/src/utils/getInjectedName.ts +++ b/packages/connectors/src/utils/getInjectedName.ts @@ -39,6 +39,7 @@ export function getInjectedName(ethereum?: WindowProvider) { if (provider.isRabby) return 'Rabby Wallet' if (provider.isRainbow) return 'Rainbow' if (provider.isStatus) return 'Status' + if (provider.isSubWallet) return 'SubWallet' if (provider.isTalisman) return 'Talisman' if (provider.isTally) return 'Taho' if (provider.isTokenPocket) return 'TokenPocket'