From 83341d5b7dbc1601dd3316991edef13c67c6bb89 Mon Sep 17 00:00:00 2001 From: Riccardo Balbo Date: Fri, 22 Nov 2024 15:26:18 +0100 Subject: [PATCH] add in error message how high are estimated fees when too high (#1634) --- wallets/wrap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wallets/wrap.js b/wallets/wrap.js index 8b7d1e23..26fe35d4 100644 --- a/wallets/wrap.js +++ b/wallets/wrap.js @@ -181,7 +181,7 @@ export default async function wrapInvoice ({ bolt11, feePercent }, { msats, desc const minEstFees = toPositiveNumber(routingFeeMsat) const outgoingMaxFeeMsat = Math.ceil(toPositiveNumber(msats * MAX_FEE_ESTIMATE_PERCENT) / 100) if (minEstFees > outgoingMaxFeeMsat) { - throw new Error('Estimated fees are too high') + throw new Error('Estimated fees are too high (' + minEstFees + ' > ' + outgoingMaxFeeMsat + ')') } // calculate the incoming invoice amount, without fees