aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-10-01 14:30:16 -0400
committerAdam Soltys <[email protected]>2020-10-01 14:30:16 -0400
commit26b84321aab848733f70a51409495b3cdb3fccde (patch)
tree475ab0f15d890b80f1bd6b85c87b35f14e43bb60
parentab68967fe875719eee6b94e5bc9b3e2131a10bda (diff)
downloadcoinos-server-26b84321aab848733f70a51409495b3cdb3fccde.tar.gz
coinos-server-26b84321aab848733f70a51409495b3cdb3fccde.zip
fix variable scope bug
-rw-r--r--routes/swaps.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/swaps.js b/routes/swaps.js
index 7aca743c..43fb7c96 100644
--- a/routes/swaps.js
+++ b/routes/swaps.js
@@ -306,10 +306,11 @@ app.post(
await btc.increment({ balance: p.fee }, { transaction });
await btc.reload({ transaction });
+
+ emit(p.user.username, "account", btc.get({ plain: true }));
}
emit(p.user.username, "payment", payment.get({ plain: true }));
- emit(p.user.username, "account", btc.get({ plain: true }));
p = p.get({ plain: true });
p.a1 = p.acc1.asset;