aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-05-18 15:52:45 -0700
committerAdam Soltys <[email protected]>2020-05-18 15:52:45 -0700
commit96c0f755328986002f79185bef8d6fb45c0fe0d3 (patch)
tree01fdde4408b3c13b93bcdd8c44c5e23df1a87a48
parente38152e352cdcd6ea5468b21bd9a5740c004c7dc (diff)
downloadcoinos-server-96c0f755328986002f79185bef8d6fb45c0fe0d3.tar.gz
coinos-server-96c0f755328986002f79185bef8d6fb45c0fe0d3.zip
fee variable
-rw-r--r--routes/assets.js4
-rw-r--r--routes/bitcoin/send.js2
-rw-r--r--routes/liquid/send.js2
3 files changed, 4 insertions, 4 deletions
diff --git a/routes/assets.js b/routes/assets.js
index db387595..65ca75aa 100644
--- a/routes/assets.js
+++ b/routes/assets.js
@@ -71,8 +71,8 @@ app.post("/assets", auth, async (req, res) => {
});
if (Math.round(funded.fee * SATS) > account.balance) {
- l.error("amount exceeds balance", asset_amount, fee, account.balance);
- throw new Error("insufficient funds");
+ l.error("amount exceeds balance", asset_amount, funded.fee, account.balance);
+ throw new Error("Insufficient funds");
}
account.balance -= Math.round(funded.fee * SATS);
diff --git a/routes/bitcoin/send.js b/routes/bitcoin/send.js
index d9324028..b47af00e 100644
--- a/routes/bitcoin/send.js
+++ b/routes/bitcoin/send.js
@@ -47,7 +47,7 @@ module.exports = async (req, res) => {
if (total > account.balance) {
l.error("amount exceeds balance", amount, fee, account.balance);
- throw new Error("insufficient funds");
+ throw new Error("Insufficient funds");
}
account.balance -= total;
diff --git a/routes/liquid/send.js b/routes/liquid/send.js
index 4d8b8d4c..5bfea060 100644
--- a/routes/liquid/send.js
+++ b/routes/liquid/send.js
@@ -66,7 +66,7 @@ module.exports = async (req, res) => {
fee,
balance: account.balance
});
- throw new Error("insufficient funds");
+ throw new Error("Insufficient funds");
}
account.balance -= total;