aboutsummaryrefslogtreecommitdiffstats
path: root/routes/bitcoin
diff options
context:
space:
mode:
Diffstat (limited to 'routes/bitcoin')
-rw-r--r--routes/bitcoin/send.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/routes/bitcoin/send.js b/routes/bitcoin/send.js
index 634b223b..0d0bf68b 100644
--- a/routes/bitcoin/send.js
+++ b/routes/bitcoin/send.js
@@ -91,11 +91,12 @@ module.exports = ah(async (req, res) => {
transaction
});
+ let fee_payment;
let fee_payment_id = null;
if (conversionFee) {
await receiverAccount.increment({ balance: conversionFee }, { transaction });
await receiverAccount.reload({ transaction });
- let fee_payment = await db.Payment.create({
+ fee_payment = await db.Payment.create({
amount: conversionFee,
fee: 0,
memo: "Bitcoin conversion fee",
@@ -136,6 +137,7 @@ module.exports = ah(async (req, res) => {
payment = payment.get({ plain: true });
payment.account = account.get({ plain: true });
+ payment.fee_payment = fee_payment && fee_payment.get({ plain: true });
emit(user.username, "payment", payment);
res.send(payment);