fix: compare floats to floats in checkPending — was comparing sats vs floats, always false

This commit is contained in:
M1 2026-03-18 23:33:47 +04:00
parent 4cdd4b5343
commit 1cbbd65adb
1 changed files with 3 additions and 2 deletions

View File

@ -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);