Skip to content

Commit

Permalink
Do not export future balances (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
idpaterson authored Nov 15, 2023
1 parent 0c681e6 commit 320fd69
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/shared/lib/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ const fetchDailyBalancesForMonthIntervals = async ({
type: 'CUSTOM',
startDate: start.toISODate(),
// end is really the start of the next month, so subtract one day
endDate: end.minus({ day: 1 }).toISODate(),
endDate: end < DateTime.now()
? end.minus({ day: 1 }).toISODate()
: DateTime.now().toISODate(),
},
overrideApiKey,
})
Expand Down

0 comments on commit 320fd69

Please sign in to comment.