fix: compare floats to floats in checkPending — was comparing sats vs floats, always false
This commit is contained in:
parent
4cdd4b5343
commit
1cbbd65adb
|
|
@ -207,8 +207,9 @@ async function checkPending(payment: any) {
|
||||||
const coin = COINS[payment.coin];
|
const coin = COINS[payment.coin];
|
||||||
if (!coin) return;
|
if (!coin) return;
|
||||||
|
|
||||||
const expectedSats = cryptoToSats(payment.coin, payment.amount_crypto);
|
const multiplier = payment.coin === "xec" ? 100 : 1e8;
|
||||||
const threshold = expectedSats * 0.995;
|
const expectedCrypto = parseFloat(payment.amount_crypto);
|
||||||
|
const threshold = expectedCrypto * 0.995;
|
||||||
|
|
||||||
const confirmed = sumReceived(info, true);
|
const confirmed = sumReceived(info, true);
|
||||||
const total = sumReceived(info, false);
|
const total = sumReceived(info, false);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue