From 641d2872d8013cbb9d290cd9412227d72a2fb324 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 21 Feb 2024 14:50:26 -0600 Subject: [PATCH] Actually, revert anything Alby would sign to nip04 since Alby doesn't support nip44 yet --- src/pipeline.ts | 2 +- src/signers/APISigner.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pipeline.ts b/src/pipeline.ts index 7186c21..ead0044 100644 --- a/src/pipeline.ts +++ b/src/pipeline.ts @@ -197,7 +197,7 @@ async function payZap(event: DittoEvent, signal: AbortSignal) { const nwcRequestEvent = await signer.signEvent({ kind: 23194, - content: await signer.nip44.encrypt( + content: await signer.nip04.encrypt( event.pubkey, JSON.stringify({ method: 'pay_invoice', params: { invoice: pr } }), ), diff --git a/src/signers/APISigner.ts b/src/signers/APISigner.ts index 71af099..cc4cde3 100644 --- a/src/signers/APISigner.ts +++ b/src/signers/APISigner.ts @@ -63,7 +63,7 @@ export class APISigner implements NostrSigner { createAdminEvent({ kind: 24133, - content: await new AdminSigner().nip44.encrypt( + content: await new AdminSigner().nip04.encrypt( pubkey, JSON.stringify({ id: messageId, @@ -93,7 +93,7 @@ export class APISigner implements NostrSigner { this.#c.req.raw.signal.addEventListener('abort', close); for await (const event of sub) { - const decrypted = await new AdminSigner().nip44.decrypt(event.pubkey, event.content); + const decrypted = await new AdminSigner().nip04.decrypt(event.pubkey, event.content); const result = jsonSchema .pipe(connectResponseSchema)