aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routes/lightning/receive.js2
-rw-r--r--routes/liquid/send.js5
2 files changed, 3 insertions, 4 deletions
diff --git a/routes/lightning/receive.js b/routes/lightning/receive.js
index 6d10eb9b..89ad4c29 100644
--- a/routes/lightning/receive.js
+++ b/routes/lightning/receive.js
@@ -63,7 +63,7 @@ const handlePayment = async (msg) => {
await account.increment({ balance: total }, { transaction });
// get the # of fee credits you would need to pay off this amount of bitcoin
- await account.increment({ btc_credits: computeConversionFee(total) }, { transaction });
+ await account.increment({ lightning_credits: computeConversionFee(total) }, { transaction });
await account.reload({ transaction });
await invoice.save({ transaction });
await payment.save({ transaction });
diff --git a/routes/liquid/send.js b/routes/liquid/send.js
index b5f69956..b844590d 100644
--- a/routes/liquid/send.js
+++ b/routes/liquid/send.js
@@ -174,8 +174,7 @@ sendLiquid = async ({ asset, amount, user, address, memo, tx, limit }) => {
network: "COINOS"
};
fee_payment.account = receiverAccount;
- payments.push(fee_payment);
- fee_payment_id = fee_payment.id;
+ ({ id: fee_payment_id } = await db.Payment.create(fee_payment, { transaction }));
}
let payment = {
@@ -190,7 +189,7 @@ sendLiquid = async ({ asset, amount, user, address, memo, tx, limit }) => {
confirmed: true,
received: false,
network: "liquid",
- fee_payment_id: fee_payment_id
+ fee_payment_id,
};
payment.account = account;