Skip to content

Commit 8ed428c

Browse files
committed
Support for any extension wallet that satisfies the standard
1 parent db71321 commit 8ed428c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/web3-react/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export type Mode = 'light' | 'dark' | 'auto'
3333
export type CustomTheme = any // TODO: define type
3434
export const connectorIds = ['injected', 'walletConnect', 'desktopWallet'] as const
3535
export type ConnectorId = (typeof connectorIds)[number]
36-
export type InjectedProviderId = 'Alephium' | 'OneKey'
36+
export type InjectedProviderId = string
3737

3838
export type CustomStyle = {
3939
theme?: Theme

packages/web3-react/src/utils/injectedProviders.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ export function getInjectedProviderId(provider: AlephiumWindowObject): InjectedP
106106
if (provider.icon.includes('onekey')) {
107107
return 'OneKey'
108108
}
109-
return 'Alephium'
109+
if (provider.id === 'alephium' && provider.name === 'Alephium') {
110+
return 'Alephium'
111+
}
112+
return provider.name
110113
}
111114

112115
export async function getInjectedProvider(

0 commit comments

Comments
 (0)