Skip to content

Commit

Permalink
add fetchWalletList
Browse files Browse the repository at this point in the history
  • Loading branch information
NorbertBodziony committed Feb 21, 2024
1 parent f909618 commit ac1bb7b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion sdk/packages/selector-polkadot/src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,10 +571,20 @@ export class NightlyConnectAdapter implements Injected {
innerConnect()
})
fetchWalletsFromRegistry = async () => {
return AppPolkadot.getWalletsMetadata(
this._metadataWallets = await AppPolkadot.getWalletsMetadata(
`${this._appInitData.url ?? 'https://nc2.nightly.app'}/get_wallets_metadata`
)
return this._metadataWallets
}
fetchWalletList = async () => {
const metadataWallets = await this.fetchWalletsFromRegistry()
this.walletsList = getPolkadotWalletsList(
metadataWallets,
getRecentWalletForNetwork(this.network)?.walletName ?? undefined
)
return this.walletsList
}

disconnect = async () => {
try {
// Some apps might use disconnect to reset state / recreate session
Expand Down

0 comments on commit ac1bb7b

Please sign in to comment.