aboutsummaryrefslogtreecommitdiffstats
path: root/routes/liquid/send.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-07-05 11:51:26 -0700
committerAdam Soltys <[email protected]>2022-07-05 11:51:26 -0700
commit135c5766061f753eaa4ed9394493ecbf938e458c (patch)
tree3dd691dbbeabea4d161e98720beabcc59c53b273 /routes/liquid/send.js
parent58f609efd159fca5db1a9b359f9e3f1e26ace302 (diff)
downloadcoinos-server-135c5766061f753eaa4ed9394493ecbf938e458c.tar.gz
coinos-server-135c5766061f753eaa4ed9394493ecbf938e458c.zip
create fee payment record and capture id
Diffstat (limited to 'routes/liquid/send.js')
-rw-r--r--routes/liquid/send.js5
1 files changed, 2 insertions, 3 deletions
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;