diff options
Diffstat (limited to 'sendCoins.js')
| -rw-r--r-- | sendCoins.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sendCoins.js b/sendCoins.js index b65fe94c..8aaecb28 100644 --- a/sendCoins.js +++ b/sendCoins.js @@ -67,7 +67,7 @@ module.exports = (app, bc, db, emit) => async (req, res) => { await req.user.save({ transaction }); emit(req.user.username, "user", req.user); - await db.Payment.create( + const payment = await db.Payment.create( { amount: -total, user_id: req.user.id, @@ -79,6 +79,8 @@ module.exports = (app, bc, db, emit) => async (req, res) => { }, { transaction } ); + + emit(req.user.username, "payment", payment); }); res.send({ txid, tx, amount, fees: fee }); |
