aboutsummaryrefslogtreecommitdiffstats
path: root/lib/send.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2021-12-17 14:49:07 -0500
committerAdam Soltys <[email protected]>2021-12-17 14:49:07 -0500
commit0faec2bde7c0581cbbb9eb243d8be50d69d81757 (patch)
tree356681cb8ca34cf73c1708ac884ab441a98f14a9 /lib/send.js
parent5ca75ae13743aa2b33eacfa57deca90a03135cd2 (diff)
downloadcoinos-server-0faec2bde7c0581cbbb9eb243d8be50d69d81757.tar.gz
coinos-server-0faec2bde7c0581cbbb9eb243d8be50d69d81757.zip
get address from rpc
Diffstat (limited to 'lib/send.js')
-rw-r--r--lib/send.js8
1 files changed, 5 insertions, 3 deletions
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;