Browse Source
Temporary fix balance calculation when no counter value for date
master
meriadec
7 years ago
No known key found for this signature in database
GPG Key ID: 1D2FC2305E2CB399
1 changed files with
5 additions and
0 deletions
-
src/helpers/balance.js
|
|
@ -89,6 +89,11 @@ export function getBalanceHistoryForAccount({ |
|
|
|
balance = b / 10 ** unit.magnitude * counterVals[date] |
|
|
|
} |
|
|
|
|
|
|
|
if (isNaN(balance)) { |
|
|
|
console.warn(`This should not happen. Cant calculate balance for ${date}`) // eslint-disable-line no-console
|
|
|
|
return { date, balance: 0 } |
|
|
|
} |
|
|
|
|
|
|
|
return { date, balance } |
|
|
|
}) |
|
|
|
} |
|
|
|