fix nip7 signer
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Kieran 2023-07-06 15:00:28 +01:00
parent 45a0ef4445
commit 64d64b29c3
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
3 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@snort/system-react", "name": "@snort/system-react",
"version": "1.0.10", "version": "1.0.11",
"description": "React hooks for @snort/system", "description": "React hooks for @snort/system",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
@ -16,8 +16,8 @@
"dist" "dist"
], ],
"dependencies": { "dependencies": {
"@snort/system": "^1.0.15", "react": "^18.2.0",
"@snort/shared": "^1.0.4", "@snort/system": "^1.0.16",
"react": "^18.2.0" "@snort/shared": "^1.0.4"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@snort/system", "name": "@snort/system",
"version": "1.0.15", "version": "1.0.16",
"description": "Snort nostr system package", "description": "Snort nostr system package",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",

View File

@ -25,12 +25,12 @@ export class Nip7Signer implements EventSigner {
init(): Promise<void> { init(): Promise<void> {
return Promise.resolve(); return Promise.resolve();
} }
async getPubKey(): Promise<string> { async getPubKey(): Promise<string> {
if (!window.nostr) { if (!window.nostr) {
throw new Error("Cannot use NIP-07 signer, not found!"); 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<string> { async nip4Encrypt(content: string, key: string): Promise<string> {