diff options
Diffstat (limited to 'routes/bitcoin/send.js')
| -rw-r--r-- | routes/bitcoin/send.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/bitcoin/send.js b/routes/bitcoin/send.js index fe2b2862..9d64bb59 100644 --- a/routes/bitcoin/send.js +++ b/routes/bitcoin/send.js @@ -54,7 +54,7 @@ module.exports = ah(async (req, res) => { if (total > account.balance) { l.error("amount exceeds balance", amount, fee, account.balance); - throw new Error("Insufficient funds"); + throw new Error("low balance"); } await account.decrement({ balance: total }, { transaction }); @@ -92,6 +92,7 @@ module.exports = ah(async (req, res) => { payments.push(params.hash); l.info("sent bitcoin", user.username, total); } catch (e) { + if (e.message.includes("Insufficient")) e.message = "The coinos server hot wallet has insufficient funds to complete the payment, try again later"; l.error("error sending bitcoin", e.message); return res.status(500).send(e.message); } |
