bug: anon zaps

This commit is contained in:
Kieran 2023-04-11 12:50:58 +01:00
parent 49c8818995
commit 0af8591454
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
2 changed files with 2 additions and 2 deletions

View File

@ -131,7 +131,7 @@ export default function SendSats(props: SendSatsProps) {
console.debug("Generated new key for zap: ", randomKey);
ev.pubkey = randomKey.publicKey;
ev.id = "";
ev.tags.push(["anon"]);
ev.tags.push(["anon", ""]);
await EventExt.sign(ev, randomKey.privateKey);
}
zap = ev;

View File

@ -36,7 +36,7 @@ export function parseZap(zapReceipt: TaggedRawEvent, refNote?: TaggedRawEvent):
throw new Error("deprecated zap format");
}
const isForwardedZap = refNote?.tags.some(a => a[0] === "zap") ?? false;
const anonZap = findTag(zapRequest, "anon");
const anonZap = zapRequest.tags.find(a => a[0] === "anon");
const metaHash = sha256(innerZapJson);
const pollOpt = zapRequest.tags.find(a => a[0] === "poll_option")?.[1];
const ret: ParsedZap = {