diff --git a/packages/connectors/src/types.ts b/packages/connectors/src/types.ts index e8e16973..ec47d0a3 100644 --- a/packages/connectors/src/types.ts +++ b/packages/connectors/src/types.ts @@ -9,6 +9,7 @@ import { import { ConnectorData } from './base' type InjectedProviderFlags = { + isInfinityWallet?: true isApexWallet?: true isAvalanche?: true isBackpack?: true diff --git a/packages/connectors/src/utils/getInjectedName.test.ts b/packages/connectors/src/utils/getInjectedName.test.ts index a2588b4d..4191d3be 100644 --- a/packages/connectors/src/utils/getInjectedName.test.ts +++ b/packages/connectors/src/utils/getInjectedName.test.ts @@ -5,6 +5,7 @@ import { getInjectedName } from './getInjectedName' describe.each([ { ethereum: undefined, expected: 'Injected' }, + { ethereum: { isInfinityWallet: true }, expected: 'Infinity Wallet' }, { ethereum: { isApexWallet: true }, expected: 'Apex Wallet' }, { ethereum: { isApexWallet: true, isMetaMask: true }, diff --git a/packages/connectors/src/utils/getInjectedName.ts b/packages/connectors/src/utils/getInjectedName.ts index eea7a4d8..91919218 100644 --- a/packages/connectors/src/utils/getInjectedName.ts +++ b/packages/connectors/src/utils/getInjectedName.ts @@ -4,6 +4,7 @@ export function getInjectedName(ethereum?: WindowProvider) { if (!ethereum) return 'Injected' const getName = (provider: WindowProvider) => { + if (provider.isInfinityWallet) return 'Infinity Wallet' if (provider.isApexWallet) return 'Apex Wallet' if (provider.isAvalanche) return 'Core Wallet' if (provider.isBackpack) return 'Backpack'