FIX: remove the LNURLp metadata validation

This commit is contained in:
overtorment 2024-01-31 12:14:42 +00:00 committed by Overtorment
parent 3085aa9855
commit 3da1a3339c

View File

@ -146,7 +146,7 @@ export default class Lnurl {
const decoded = this.decodeInvoice(this._lnurlPayServiceBolt11Payload.pr);
const metadataHash = createHash('sha256').update(this._lnurlPayServicePayload.metadata).digest('hex');
if (metadataHash !== decoded.description_hash) {
throw new Error(`Invoice description_hash doesn't match metadata.`);
console.log(`Invoice description_hash doesn't match metadata.`);
}
if (parseInt(decoded.num_satoshis, 10) !== Math.round(amountSat)) {
throw new Error(`Invoice doesn't match specified amount, got ${decoded.num_satoshis}, expected ${Math.round(amountSat)}`);