From a50a2c8bd1739e5f206063d3e92f7c52f59f2a6f Mon Sep 17 00:00:00 2001 From: ekzyis Date: Fri, 13 Dec 2024 21:19:00 +0100 Subject: [PATCH] Fix receiver fallbacks depend on fast polls (#1723) --- wallets/payment.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wallets/payment.js b/wallets/payment.js index 33baa717..1904d67f 100644 --- a/wallets/payment.js +++ b/wallets/payment.js @@ -58,10 +58,9 @@ export function useWalletPayment () { // we just need to distinguish between receiver and sender errors try { - // we always await the poll promise here to check for failed forwards since sender wallet errors + // we need to poll one more time to check for failed forwards since sender wallet errors // can be caused by them which we want to handle as receiver errors, not sender errors. - // but we don't wait forever because real sender errors will cause the poll promise to never settle. - await withTimeout(pollPromise, FAST_POLL_INTERVAL * 2.5) + await invoiceHelper.isInvoice(latestInvoice, waitFor) } catch (err) { if (err instanceof WalletError) { paymentError = err