1
0
mirror of git://jb55.com/damus synced 2024-10-06 11:43:21 +00:00

zaps: ensure returned bolt11 is the correct amount

This commit is contained in:
William Casarin 2023-05-13 19:51:06 -07:00
parent dafa1ba4de
commit 1518a0a16c

View File

@ -293,5 +293,12 @@ func fetch_zap_invoice(_ payreq: LNUrlPayRequest, zapreq: NostrEvent?, sats: Int
return nil
}
// make sure it's the correct amount
guard let bolt11 = decode_bolt11(result.pr),
.specific(amount) == bolt11.amount
else {
return nil
}
return result.pr
}