From f30b18736c5ec8929837cc81721cdd399a032d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?NB=F0=9F=98=88?= Date: Mon, 19 Feb 2024 17:39:21 +0100 Subject: [PATCH] add getters for wallets --- sdk/packages/selector-polkadot/src/adapter.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sdk/packages/selector-polkadot/src/adapter.ts b/sdk/packages/selector-polkadot/src/adapter.ts index 4d5c4734..99a94bb0 100644 --- a/sdk/packages/selector-polkadot/src/adapter.ts +++ b/sdk/packages/selector-polkadot/src/adapter.ts @@ -102,6 +102,9 @@ export class NightlyConnectAdapter implements Injected { get network() { return this._appInitData.network } + get walletsFromRegistry() { + return this._metadataWallets + } get walletsList() { return this._walletsList } @@ -552,7 +555,11 @@ export class NightlyConnectAdapter implements Injected { innerConnect() }) - + fetchWalletsFromRegistry = async () => { + return AppPolkadot.getWalletsMetadata( + `${this._appInitData.url ?? 'https://nc2.nightly.app'}/get_wallets_metadata` + ) + } disconnect = async () => { try { // Some apps might use disconnect to reset state / recreate session