aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners
diff options
context:
space:
mode:
Diffstat (limited to 'src/cleaners')
-rw-r--r--src/cleaners/skyblock/bank.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cleaners/skyblock/bank.ts b/src/cleaners/skyblock/bank.ts
index 7424a75..4eace04 100644
--- a/src/cleaners/skyblock/bank.ts
+++ b/src/cleaners/skyblock/bank.ts
@@ -18,14 +18,14 @@ export function cleanBank(data: any): Bank {
// we go in reverse so we can simulate the bank transactions
for (const transaction of data.banking.transactions.sort((a, b) => b.timestamp - a.timestamp)) {
const change = transaction.action === 'DEPOSIT' ? transaction.amount : -transaction.amount
- // since we're going in reverse, we remove from the total balance when adding to the history
- bankBalance -= change
history.push({
change: Math.round(change * 10) / 10,
total: Math.round(bankBalance * 10) / 10,
timestamp: transaction.timestamp,
name: transaction.initiator_name,
})
+ // since we're going in reverse, we remove from the total balance when adding to the history
+ bankBalance -= change
}
}