diff --git a/applications/daily_tests/automatic_recovery_test.js b/applications/daily_tests/automatic_recovery_test.js index df6fc62c92..c305f92e89 100644 --- a/applications/daily_tests/automatic_recovery_test.js +++ b/applications/daily_tests/automatic_recovery_test.js @@ -87,10 +87,13 @@ async function run(options = {}) { let scannedMatch = data.match(RECOVERY_COMPLETE_REGEXP); let recoveredAmountMatch = data.match(RECOVERY_WORTH_REGEXP); if (scannedMatch && recoveredAmountMatch) { - let recoveredAmount = parseInt(recoveredAmountMatch[1]); + // JS probably doesn't care but rust would! + let recoveredAmount = 0; if (recoveredAmountMatch[2] === "T") { // convert to micro tari - recoveredAmount *= 1000000; + recoveredAmount = round(parseFloat(recoveredAmountMatch[1]) * 1000000); + } else { + recoveredAmount = parseInt(recoveredAmountMatch[1]); } return { numScanned: parseInt(scannedMatch[1]),