From aff872f2a282491382f46f6c7bb6a6b5822f0dbb Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 4 Dec 2025 08:45:41 -0800 Subject: fix balance calculation --- routes/users.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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, + ); } } -- cgit v1.2.3