aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners/skyblock/bank.ts
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-03-21 15:27:07 +0000
committermat <github@matdoes.dev>2022-03-21 15:27:07 +0000
commit105c261eb35696a4bbbe99d33d66482ee07c8a70 (patch)
tree24cf6108a15f0924a28e0c4e3eaff73a14ef72fc /src/cleaners/skyblock/bank.ts
parenta99878779302ea018594464142c016c8a302cb50 (diff)
downloadskyblock-api-105c261eb35696a4bbbe99d33d66482ee07c8a70.tar.gz
skyblock-api-105c261eb35696a4bbbe99d33d66482ee07c8a70.tar.bz2
skyblock-api-105c261eb35696a4bbbe99d33d66482ee07c8a70.zip
round bank balance amount
Diffstat (limited to 'src/cleaners/skyblock/bank.ts')
-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 dd18c24..c0badc4 100644
--- a/src/cleaners/skyblock/bank.ts
+++ b/src/cleaners/skyblock/bank.ts
@@ -1,5 +1,5 @@
export interface Bank {
- balance: number
+ balance?: number
history: BankHistoryItem[]
}
@@ -32,7 +32,7 @@ export function cleanBank(data: any): Bank {
history.reverse()
return {
- balance: data?.banking?.balance ?? 0,
+ balance: data?.banking?.balance ? Math.round(data.banking.balance * 10) / 10 : undefined,
history
}
} \ No newline at end of file