aboutsummaryrefslogtreecommitdiffstats
path: root/routes/send.js
diff options
context:
space:
mode:
authorRan Guin <[email protected]>2021-08-21 01:39:43 -0700
committerRan Guin <[email protected]>2021-08-21 01:39:43 -0700
commit6724a8660b9d47dcbac362122006cf454f13512f (patch)
tree4e91b5f9a09a4371502c65c66b6c5d080a050f7b /routes/send.js
parentc0106191e9d25ac51b3142a79cb749b11616e20f (diff)
parent71feadc098cf374f37bb168204dee443aa9a50f0 (diff)
downloadcoinos-server-6724a8660b9d47dcbac362122006cf454f13512f.tar.gz
coinos-server-6724a8660b9d47dcbac362122006cf454f13512f.zip
Merge branch 'dev' of https://github.com/coinos/coinos-server into dev
Diffstat (limited to 'routes/send.js')
-rw-r--r--routes/send.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/routes/send.js b/routes/send.js
index 9b4396ef..e8fdb79c 100644
--- a/routes/send.js
+++ b/routes/send.js
@@ -68,7 +68,6 @@ module.exports = ah(async (req, res, next) => {
emit(user.username, "payment", payment);
emit(user.username, "account", account);
- emit(user.username, "user", user);
if (username) {
let recipient = await db.User.findOne(
@@ -85,6 +84,7 @@ module.exports = ah(async (req, res, next) => {
let text = address || payreq;
params = {
where: { user_id: recipient.id },
+ order: [["id", "DESC"]],
};
if (text) params.where.text = text;
let invoice = await db.Invoice.findOne(params);
@@ -164,8 +164,8 @@ module.exports = ah(async (req, res, next) => {
p2 = p2.get({ plain: true });
p2.account = a2.get({ plain: true });
- emit(recipient.username, "account", p2.account);
emit(recipient.username, "payment", p2);
+ emit(recipient.username, "account", p2.account);
l.info("received internal", recipient.username, amount);
notify(recipient, `Received ${amount} ${a2.ticker} sats`);