From 64d64b29c3b672701b28e684fe5906d689dc592f Mon Sep 17 00:00:00 2001 From: Kieran Date: Thu, 6 Jul 2023 15:00:28 +0100 Subject: [PATCH] fix nip7 signer --- packages/system-react/package.json | 10 +++++----- packages/system/package.json | 2 +- packages/system/src/impl/nip7.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/system-react/package.json b/packages/system-react/package.json index 679f917d..19a00e87 100644 --- a/packages/system-react/package.json +++ b/packages/system-react/package.json @@ -1,6 +1,6 @@ { "name": "@snort/system-react", - "version": "1.0.10", + "version": "1.0.11", "description": "React hooks for @snort/system", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -16,8 +16,8 @@ "dist" ], "dependencies": { - "@snort/system": "^1.0.15", - "@snort/shared": "^1.0.4", - "react": "^18.2.0" + "react": "^18.2.0", + "@snort/system": "^1.0.16", + "@snort/shared": "^1.0.4" } -} +} \ No newline at end of file diff --git a/packages/system/package.json b/packages/system/package.json index 606da2d1..8b688a2f 100644 --- a/packages/system/package.json +++ b/packages/system/package.json @@ -1,6 +1,6 @@ { "name": "@snort/system", - "version": "1.0.15", + "version": "1.0.16", "description": "Snort nostr system package", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/system/src/impl/nip7.ts b/packages/system/src/impl/nip7.ts index fe10e819..6d6c92c3 100644 --- a/packages/system/src/impl/nip7.ts +++ b/packages/system/src/impl/nip7.ts @@ -25,12 +25,12 @@ export class Nip7Signer implements EventSigner { init(): Promise { return Promise.resolve(); } - + async getPubKey(): Promise { if (!window.nostr) { throw new Error("Cannot use NIP-07 signer, not found!"); } - return await window.nostr.getPublicKey(); + return await barrierQueue(Nip7Queue, () => unwrap(window.nostr).getPublicKey()); } async nip4Encrypt(content: string, key: string): Promise {