diff --git a/clients/libs/web/main.js b/clients/libs/web/main.js index 6418940f..a994148e 100644 --- a/clients/libs/web/main.js +++ b/clients/libs/web/main.js @@ -132,9 +132,9 @@ const verifyInvoice = async (clientConfig, batchId, paymentRequest) => { const decodedInvoice = await decodeInvoice(paymentRequest); let paymentHash = await getPaymentHash(clientConfig, batchId); - console.log("Decoded Invoice: ", decodedInvoice); - - return paymentHash === decodedInvoice.tagsObject.payment_hash; + + const paymentHashFromInvoice = invoiceData.tags.find(tag => tag.tagName === "payment_hash")?.data; + return paymentHash === paymentHashFromInvoice; } export default {