From 88990faa498ab269d1745dc6524cddf2fe9e5245 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 4 May 2023 10:05:51 -0700 Subject: set rate for pot invoices --- lib/payments.js | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/payments.js') 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 { -- cgit v1.2.3