aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routes/bitcoin/send.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/routes/bitcoin/send.js b/routes/bitcoin/send.js
index 51962367..67857121 100644
--- a/routes/bitcoin/send.js
+++ b/routes/bitcoin/send.js
@@ -70,10 +70,7 @@ module.exports = ah(async (req, res) => {
await account.decrement({ balance: (total + withdrawalFee) }, { transaction });
await account.reload({ transaction });
- });
- // pay withdrawal fee to receiver
- await db.transaction(async transaction => {
let receiverAccount = await db.Account.findOne({
where: {
"$user.username$": withdrawalFeeReceiver
@@ -101,7 +98,9 @@ module.exports = ah(async (req, res) => {
confirmed: true,
received: true,
network: "COINOS"
- });
+ },
+ { transaction }
+ );
});
// record the external bitcoin transaction