aboutsummaryrefslogtreecommitdiffstats
path: root/liquidPayments.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-02-03 14:02:26 -0800
committerAdam Soltys <[email protected]>2020-02-03 14:02:26 -0800
commitc57d4570ee381043ded4c9dfa0b03d81f319f2ee (patch)
treea8809a41aa34630be89d602440b7791eed4b48b4 /liquidPayments.js
parent941ac6df66dcd46063cb8a07b282e3c37ad23bf8 (diff)
downloadcoinos-server-c57d4570ee381043ded4c9dfa0b03d81f319f2ee.tar.gz
coinos-server-c57d4570ee381043ded4c9dfa0b03d81f319f2ee.zip
payments fixes
Diffstat (limited to 'liquidPayments.js')
-rw-r--r--liquidPayments.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/liquidPayments.js b/liquidPayments.js
index afa33466..dda85232 100644
--- a/liquidPayments.js
+++ b/liquidPayments.js
@@ -77,7 +77,7 @@ module.exports = (app, db, addresses, payments, emit) => {
hash: blinded.txid,
amount: value,
currency: liquid.currency,
- rate: app.get("ask"),
+ rate: app.get("rates")[user.currency],
received: true,
tip,
confirmed,
@@ -131,7 +131,12 @@ module.exports = (app, db, addresses, payments, emit) => {
await p.save();
let payments = await db.Payment.findAll({
- where: { user_id: user.id },
+ where: {
+ user_id: user.id,
+ received: {
+ [Sequelize.Op.ne]: null
+ },
+ },
order: [['id', 'DESC']],
limit: 12
});