fix: get lock pubkey from nutzap info

This commit is contained in:
P. Reis 2025-02-25 15:59:40 -03:00
parent 51faffc9e2
commit e08603a42a

View file

@ -335,7 +335,7 @@ route.post('/nutzap', userMiddleware({ enc: 'nip44' }), async (c) => {
return c.json({ error: 'Target user does not have any mints setup' }, 422);
}
const p2pk = event.tags.find(([name]) => name === 'pubkey')?.[1];
const p2pk = nutzapInfo.tags.find(([name]) => name === 'pubkey')?.[1];
if (!p2pk) {
return c.json({ error: 'Target user does not have a cashu pubkey' }, 422);
}