From efa5cf9c0a6008adedd53f9f9dbc4e335e837d31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?NB=F0=9F=98=88?= Date: Fri, 20 Oct 2023 10:43:02 +0200 Subject: [PATCH] fixes and new version --- sdk/apps/modal-example/package.json | 4 ++-- sdk/apps/polkadot/package.json | 4 ++-- sdk/apps/polkadot/src/Accounts.ts | 6 +++--- sdk/packages/selector-polkadot/package.json | 4 ++-- sdk/pnpm-lock.yaml | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sdk/apps/modal-example/package.json b/sdk/apps/modal-example/package.json index 6e6f5fc0..ef716363 100644 --- a/sdk/apps/modal-example/package.json +++ b/sdk/apps/modal-example/package.json @@ -21,8 +21,8 @@ "@nightlylabs/nightly-connect-solana": "0.0.27", "@nightlylabs/nightly-connect-sui": "0.0.27", "@nightlylabs/wallet-selector-sui": "0.2.5", - "@nightlylabs/nightly-connect-polkadot": "0.0.8", - "@nightlylabs/wallet-selector-polkadot": "0.1.7", + "@nightlylabs/nightly-connect-polkadot": "0.0.11", + "@nightlylabs/wallet-selector-polkadot": "0.1.10", "@polkadot/extension-inject": "^0.46.5", "@polkadot/api": "^10.10.1", "@solana/web3.js": "^1.77.2", diff --git a/sdk/apps/polkadot/package.json b/sdk/apps/polkadot/package.json index 4b013055..df3d37c5 100644 --- a/sdk/apps/polkadot/package.json +++ b/sdk/apps/polkadot/package.json @@ -1,6 +1,6 @@ { "name": "@nightlylabs/nightly-connect-polkadot", - "version": "0.0.8", + "version": "0.0.11", "type": "module", "exports": { ".": { @@ -55,4 +55,4 @@ "eventemitter3": "^5.0.1", "uuid": "^9.0.0" } -} +} \ No newline at end of file diff --git a/sdk/apps/polkadot/src/Accounts.ts b/sdk/apps/polkadot/src/Accounts.ts index b05d2804..1e208a8c 100644 --- a/sdk/apps/polkadot/src/Accounts.ts +++ b/sdk/apps/polkadot/src/Accounts.ts @@ -18,19 +18,19 @@ export class Accounts implements InjectedAccounts { this._triggerSubs() } // TODO: what does anyType do? - public get(anyType?: boolean): Promise { + get = (anyType?: boolean): Promise => { return new Promise((resolve, reject) => { resolve(this.activeAccounts) }) } - public subscribe(cb: (accounts: InjectedAccount[]) => unknown): Unsubcall { + subscribe = (cb: (accounts: InjectedAccount[]) => unknown): Unsubcall => { const id = Date.now().toString() this.sub[id] = cb // Debounce first response to allow the subscriber to set up setTimeout(() => { this._triggerSubs() - }, 10) + }, 100) return (): void => { delete this.sub[id] } diff --git a/sdk/packages/selector-polkadot/package.json b/sdk/packages/selector-polkadot/package.json index 4e90d8dd..2ff8ef3e 100644 --- a/sdk/packages/selector-polkadot/package.json +++ b/sdk/packages/selector-polkadot/package.json @@ -1,6 +1,6 @@ { "name": "@nightlylabs/wallet-selector-polkadot", - "version": "0.1.7", + "version": "0.1.10", "description": "", "type": "module", "exports": { @@ -24,7 +24,7 @@ "author": "", "license": "ISC", "dependencies": { - "@nightlylabs/nightly-connect-polkadot": "0.0.8", + "@nightlylabs/nightly-connect-polkadot": "0.0.11", "@nightlylabs/wallet-selector-base": "0.2.3", "@polkadot/extension-inject": "0.46.5", "@polkadot/api": "10.10.1", diff --git a/sdk/pnpm-lock.yaml b/sdk/pnpm-lock.yaml index 03c6b938..92bd898b 100644 --- a/sdk/pnpm-lock.yaml +++ b/sdk/pnpm-lock.yaml @@ -129,7 +129,7 @@ importers: specifier: ^0.8.0 version: 0.8.0 '@nightlylabs/nightly-connect-polkadot': - specifier: 0.0.8 + specifier: 0.0.11 version: link:../polkadot '@nightlylabs/nightly-connect-solana': specifier: 0.0.27 @@ -138,7 +138,7 @@ importers: specifier: 0.0.27 version: link:../sui '@nightlylabs/wallet-selector-polkadot': - specifier: 0.1.7 + specifier: 0.1.10 version: link:../../packages/selector-polkadot '@nightlylabs/wallet-selector-solana': specifier: 0.2.5 @@ -626,7 +626,7 @@ importers: packages/selector-polkadot: dependencies: '@nightlylabs/nightly-connect-polkadot': - specifier: 0.0.8 + specifier: 0.0.11 version: link:../../apps/polkadot '@nightlylabs/wallet-selector-base': specifier: 0.2.3