Skip to content

Commit

Permalink
Merge pull request #486 from alephium/support-third-party-extension-w…
Browse files Browse the repository at this point in the history
…allets

Support for any extension wallet that satisfies the standard
  • Loading branch information
Lbqds authored Jan 21, 2025
2 parents db71321 + 8ed428c commit 7a835fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/web3-react/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export type Mode = 'light' | 'dark' | 'auto'
export type CustomTheme = any // TODO: define type
export const connectorIds = ['injected', 'walletConnect', 'desktopWallet'] as const
export type ConnectorId = (typeof connectorIds)[number]
export type InjectedProviderId = 'Alephium' | 'OneKey'
export type InjectedProviderId = string

export type CustomStyle = {
theme?: Theme
Expand Down
5 changes: 4 additions & 1 deletion packages/web3-react/src/utils/injectedProviders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ export function getInjectedProviderId(provider: AlephiumWindowObject): InjectedP
if (provider.icon.includes('onekey')) {
return 'OneKey'
}
return 'Alephium'
if (provider.id === 'alephium' && provider.name === 'Alephium') {
return 'Alephium'
}
return provider.name
}

export async function getInjectedProvider(
Expand Down

0 comments on commit 7a835fa

Please sign in to comment.