aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-12-04 08:45:41 -0800
committerAdam Soltys <[email protected]>2026-02-06 08:58:11 -0800
commitaff872f2a282491382f46f6c7bb6a6b5822f0dbb (patch)
treeb608695fb275bb6219650d418fd84032090c8a0d
parentbc953b56f3908e3a557976b9029b617dad751755 (diff)
downloadcoinos-server-aff872f2a282491382f46f6c7bb6a6b5822f0dbb.tar.gz
coinos-server-aff872f2a282491382f46f6c7bb6a6b5822f0dbb.zip
fix balance calculation
-rw-r--r--routes/users.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/routes/users.ts b/routes/users.ts
index f564d09f..7e9c656a 100644
--- a/routes/users.ts
+++ b/routes/users.ts
@@ -850,7 +850,10 @@ export default {
{ "content-type": "application/json" },
);
const { vtxos } = await r.json();
- account.balance = vtxos.reduce((a, b) => a + b.amount, 0);
+ account.balance = vtxos.reduce(
+ (a, b) => a + Number.parseInt(b.amount),
+ 0,
+ );
}
}