diff options
| author | Adam Soltys <[email protected]> | 2023-05-04 10:05:51 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-05-04 10:05:56 -0700 |
| commit | 88990faa498ab269d1745dc6524cddf2fe9e5245 (patch) | |
| tree | d6bbad89b7d1dae165e8cd863cc74406a44223bc /lib | |
| parent | f695cbd6d1ed9d8560363693c0f3bdcb7c78c7d8 (diff) | |
| download | coinos-server-88990faa498ab269d1745dc6524cddf2fe9e5245.tar.gz coinos-server-88990faa498ab269d1745dc6524cddf2fe9e5245.zip | |
set rate for pot invoices
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/payments.js | 1 |
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 { |
