FIX: display negative balance as zero
This commit is contained in:
parent
23e835c888
commit
77fb7c0daa
@ -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 } });
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user