aboutsummaryrefslogtreecommitdiffstats
path: root/routes/bitcoin
diff options
context:
space:
mode:
Diffstat (limited to 'routes/bitcoin')
-rw-r--r--routes/bitcoin/send.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/routes/bitcoin/send.js b/routes/bitcoin/send.js
index f1814b08..cab79e06 100644
--- a/routes/bitcoin/send.js
+++ b/routes/bitcoin/send.js
@@ -7,6 +7,7 @@ module.exports = ah(async (req, res) => {
let { hex } = tx;
let fee = toSats(tx.fee);
+ if (fee < 0) throw new Error("fee cannot be negative");
const isChange = async address =>
(await bc.getAddressInfo(address)).ismine &&