diff --git a/controllers/api.js b/controllers/api.js index d219d0b..ab2760b 100644 --- a/controllers/api.js +++ b/controllers/api.js @@ -253,6 +253,7 @@ router.get('/balance', async function(req, res) { if (!(await u.getAddress())) await u.generateAddress(); // onchain address needed further await u.accountForPosibleTxids(); let balance = await u.getBalance(); + if (balance < 0) balance = 0; res.send({ BTC: { AvailableBalance: balance } }); });