From 0faec2bde7c0581cbbb9eb243d8be50d69d81757 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 17 Dec 2021 14:49:07 -0500 Subject: get address from rpc --- lib/send.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/send.js') diff --git a/lib/send.js b/lib/send.js index b8afd056..4d3201fa 100644 --- a/lib/send.js +++ b/lib/send.js @@ -8,9 +8,11 @@ send = async (amount, memo, hash, user) => { let routingInfo = payreq.tags.find(t => t.tagName === "routing_info"); if ( routingInfo && - routingInfo.data.find(d => d.fee_proportional_millionths > 1000) - ) - throw new Error("Fee rate too high"); + routingInfo.data.find(d => d.fee_proportional_millionths > 10000) + ) { + l.warn("fee rate too high", d.fee_proportional_millionths); + throw new Error("Couldn't find a suitable route to pay to your destination"); + } if (!amount || payreq.satoshis > amount) amount = payreq.satoshis; -- cgit v1.2.3