add in error message how high are estimated fees when too high (#1634)
This commit is contained in:
parent
923ddb74ca
commit
83341d5b7d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue