diff --git a/automations/stocks.ts b/automations/stocks.ts index 7674764..51617a9 100644 --- a/automations/stocks.ts +++ b/automations/stocks.ts @@ -29,7 +29,7 @@ export class StockAutomation extends Automation { costBasis, cgtRate }) * 1000; - const shift = net - account.balance; + const shift = Math.floor(net - account.balance); // We only record transactions if they result in more than 1 unit of currency change (i.e. ignore changes in the cents range) if (Math.abs(shift) <= 1000) return; diff --git a/dist/index.js b/dist/index.js index 843b201..34142c8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -74120,7 +74120,7 @@ class StockAutomation extends automation_1.Automation { costBasis, cgtRate }) * 1000; - const shift = net - account.balance; + const shift = Math.floor(net - account.balance); // We only record transactions if they result in more than 1 unit of currency change (i.e. ignore changes in the cents range) if (Math.abs(shift) <= 1000) return;