Skip to content

Commit

Permalink
add fetching wallets on lazy load
Browse files Browse the repository at this point in the history
  • Loading branch information
NorbertBodziony committed Feb 20, 2024
1 parent e8aab83 commit 91a1173
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sdk/packages/selector-polkadot/src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,15 @@ export class NightlyConnectAdapter implements Injected {
[],
getRecentWalletForNetwork(adapter.network)?.walletName ?? undefined
)
// Fetch wallets from registry
adapter.fetchWalletsFromRegistry().then((metadataWallets) => {
adapter._metadataWallets = metadataWallets
adapter.walletsList = getPolkadotWalletsList(
metadataWallets,
getRecentWalletForNetwork(adapter.network)?.walletName ?? undefined
)
})

if (!adapter._connectionOptions.disableModal) {
adapter._modal = new NightlyConnectSelectorModal(
adapter.walletsList,
Expand Down

0 comments on commit 91a1173

Please sign in to comment.