From 33b8078fc60801dfc4b65d36bbc5853e6aaf00a2 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Tue, 25 Feb 2025 13:58:57 -0300 Subject: [PATCH] fix: add pubkey lock to proofs --- packages/ditto/controllers/api/cashu.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/ditto/controllers/api/cashu.ts b/packages/ditto/controllers/api/cashu.ts index 145bac6c..1a68d647 100644 --- a/packages/ditto/controllers/api/cashu.ts +++ b/packages/ditto/controllers/api/cashu.ts @@ -388,7 +388,10 @@ route.post('/nutzap', userMiddleware({ enc: 'nip44' }), async (c) => { const wallet = new CashuWallet(mint); await wallet.loadMint(); - const { keep: proofsToKeep, send: proofsToSend } = await wallet.send(amount, proofsToBeUsed, { includeFees: true }); + const { keep: proofsToKeep, send: proofsToSend } = await wallet.send(amount, proofsToBeUsed, { + includeFees: true, + pubkey: p2pk.length === 64 ? '02' + p2pk : p2pk, + }); const newUnspentProof = await createEvent({ kind: 7375,