aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-05-04 10:05:51 -0700
committerAdam Soltys <[email protected]>2023-05-04 10:05:56 -0700
commit88990faa498ab269d1745dc6524cddf2fe9e5245 (patch)
treed6bbad89b7d1dae165e8cd863cc74406a44223bc /lib
parentf695cbd6d1ed9d8560363693c0f3bdcb7c78c7d8 (diff)
downloadcoinos-server-88990faa498ab269d1745dc6524cddf2fe9e5245.tar.gz
coinos-server-88990faa498ab269d1745dc6524cddf2fe9e5245.zip
set rate for pot invoices
Diffstat (limited to 'lib')
-rw-r--r--lib/payments.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/payments.js b/lib/payments.js
index 7dbc1775..e1e0590e 100644
--- a/lib/payments.js
+++ b/lib/payments.js
@@ -122,6 +122,7 @@ export let credit = async (hash, amount, memo, ref, type = types.internal) => {
let equivalentRate =
invoice.rate * (store.rates[currency] / store.rates[invoice.currency]);
+
if (Math.abs(invoice.rate / store.rates[invoice.currency] - 1) < 0.01) {
rate = equivalentRate;
} else {