Skip to content

Commit

Permalink
fix wrong outgoing balance calc if ended streams at end of history
Browse files Browse the repository at this point in the history
  • Loading branch information
efstajas committed Jan 13, 2025
1 parent 27ae9fe commit 490e17f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/balances/estimate-reloaded.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export function assetOutgoingBalanceTimeline(
? new Date(startDate.getTime() + durationSeconds * 1000)
: new Date(timestamp.getTime() + durationSeconds * 1000);

if (endDate.getTime() < ts.getTime()) return acc;
if (endDate.getTime() <= ts.getTime()) return acc;
}

return acc + BigInt(amountPerSecond.amount);
Expand Down

0 comments on commit 490e17f

Please sign in to comment.