Skip to content

Commit

Permalink
fix: polkadot detection v2
Browse files Browse the repository at this point in the history
  • Loading branch information
LukassF committed Feb 28, 2024
1 parent 299798c commit 64474f3
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions sdk/packages/selector-polkadot/src/detection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,17 @@ export const getPolkadotWalletsList = (presetList: WalletMetadata[], recentWalle
// by namespace
if (walletsData[wallet.slug.toLocaleLowerCase()]) {
walletsData[wallet.slug.toLocaleLowerCase()] = {
...(walletsData?.[wallet.slug.toLocaleLowerCase()] ?? {
name: wallet.name,
icon: wallet.icon,
link: '',
deeplink: null,
recent: recentWalletName === wallet.name,
walletType: 'hybrid'
}),
...walletsData?.[wallet.slug.toLocaleLowerCase()],
recent: recentWalletName === wallet.name,
detected: true,
injectedWallet: wallet
injectedWallet: wallet,
walletType: 'hybrid'
}
continue
}

// Check if wallet is already in the list
// by name
if (walletsData[wallet.name.toLocaleLowerCase()]) {
else if (walletsData[wallet.name.toLocaleLowerCase()]) {
walletsData[wallet.name.toLocaleLowerCase()] = {
...walletsData[wallet.name.toLocaleLowerCase()],
recent: recentWalletName === wallet.name,
Expand Down

0 comments on commit 64474f3

Please sign in to comment.