aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-01-30 04:22:23 +0000
committerAdam Soltys <[email protected]>2024-01-30 04:22:23 +0000
commitda2ac3f9ba4e5e756088b7b9d79f1ac8c88aef4e (patch)
tree2ac502cd7bbea8b99e6e72b56bc61b6e34bc2970
parent9fa5c7475a43588126e4d809fcdea0c7cedd3d8c (diff)
downloadcoinos-server-da2ac3f9ba4e5e756088b7b9d79f1ac8c88aef4e.tar.gz
coinos-server-da2ac3f9ba4e5e756088b7b9d79f1ac8c88aef4e.zip
subtract
-rw-r--r--lib/payments.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/payments.js b/lib/payments.js
index 7d8bafb0..11afd17f 100644
--- a/lib/payments.js
+++ b/lib/payments.js
@@ -248,12 +248,12 @@ let pay = async ({ amount, to, user }) => {
let { callback } = await got(lnurl).json();
({ pr } = await got(`${callback}?amount=${amount * 1000}`).json());
} else if (to.startsWith("ln")) {
- amount -= maxfee;
- pr = to;
+ amount -= maxfee;
+ pr = to;
}
if (pr) await sendLightning({ user, pr, amount, maxfee });
- else await sendOnchain({ amount, address: to, user });
+ else await sendOnchain({ amount, address: to, user, subtract: true });
};
let decode = async (hex) => {