From bf6c5ff5a7b3bba840ae024312e721fedb488bce Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 6 Jan 2020 13:36:58 -0800 Subject: emit on payment send --- bitcoinPayments.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bitcoinPayments.js') 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); -- cgit v1.2.3