aboutsummaryrefslogtreecommitdiffstats
path: root/bitcoinPayments.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-01-06 13:36:58 -0800
committerAdam Soltys <[email protected]>2020-01-06 13:36:58 -0800
commitbf6c5ff5a7b3bba840ae024312e721fedb488bce (patch)
tree8acee30af13d15982ced493d2b1fb220f6d7b198 /bitcoinPayments.js
parent25cb911ae245be1956cee922e4ef62f656303907 (diff)
downloadcoinos-server-bf6c5ff5a7b3bba840ae024312e721fedb488bce.tar.gz
coinos-server-bf6c5ff5a7b3bba840ae024312e721fedb488bce.zip
emit on payment send
Diffstat (limited to 'bitcoinPayments.js')
-rw-r--r--bitcoinPayments.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/bitcoinPayments.js b/bitcoinPayments.js
index fc29e1d5..1ff402a2 100644
--- a/bitcoinPayments.js
+++ b/bitcoinPayments.js
@@ -130,7 +130,9 @@ module.exports = (app, bc, db, addresses, payments, emit) => {
await p.save();
let payments = await db.Payment.findAll({
- where: { user_id: user.id }
+ where: { user_id: user.id },
+ order: [['id', 'DESC']],
+ limit: 20
});
emit(user.username, "payments", payments);