aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--db/models/accounts.js13
-rw-r--r--routes/liquid/receive.js2
2 files changed, 12 insertions, 3 deletions
diff --git a/db/models/accounts.js b/db/models/accounts.js
index 88ad2d44..6f85b771 100644
--- a/db/models/accounts.js
+++ b/db/models/accounts.js
@@ -124,14 +124,23 @@ const attributes = {
comment: null,
field: "balance"
},
- fee_credits: {
+ btc_credits: {
type: DataTypes.DOUBLE,
allowNull: true,
defaultValue: 0.0,
primaryKey: false,
autoIncrement: false,
comment: "Credits that can be used towards paying withdrawal fees",
- field: "fee_credits"
+ field: "btc_credits"
+ },
+ liquid_credits: {
+ type: DataTypes.DOUBLE,
+ allowNull: true,
+ defaultValue: 0.0,
+ primaryKey: false,
+ autoIncrement: false,
+ comment: "Credits that can be used towards paying withdrawal fees",
+ field: "liquid_credits"
},
pending: {
type: DataTypes.DOUBLE,
diff --git a/routes/liquid/receive.js b/routes/liquid/receive.js
index 0eed35fd..9650e5b7 100644
--- a/routes/liquid/receive.js
+++ b/routes/liquid/receive.js
@@ -344,7 +344,7 @@ setInterval(async () => {
{ pending: Math.min(p.account.pending, total) },
{ transaction }
);
- await account.increment({ fee_credits: Math.floor(total * withdrawalFeeMultiplier) }, { transaction });
+ await p.account.increment({ fee_credits: Math.floor(total * withdrawalFeeMultiplier) }, { transaction });
await p.account.reload({ transaction });
await p.save({ transaction });