diff options
| author | Adam Soltys <[email protected]> | 2020-07-20 21:16:16 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-07-20 21:16:16 -0700 |
| commit | 5a15eb109b6ddd8232abfecaafc7d8ba7ada14ab (patch) | |
| tree | 04575adc8c837413bb9c743cfb2234ec95d76bbb /lib | |
| parent | 1bbf30a5ece3b361ac5eb00da052fa63cbc91a2e (diff) | |
| download | coinos-server-5a15eb109b6ddd8232abfecaafc7d8ba7ada14ab.tar.gz coinos-server-5a15eb109b6ddd8232abfecaafc7d8ba7ada14ab.zip | |
atomic swaps
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/binance.js | 6 | ||||
| -rw-r--r-- | lib/sockets.js | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/lib/binance.js b/lib/binance.js index 1951d820..aa6364c8 100644 --- a/lib/binance.js +++ b/lib/binance.js @@ -15,9 +15,13 @@ module.exports = () => { rates[symbol] = msg.c * fx[symbol]; }); + app.set("ask", msg.a); + app.set("last", msg.l); + app.set("balance", await lq.getBalance()); app.set("rates", rates); + checkQueue(); } catch (e) { - l.error("binance socket error", e); + l.error("binance socket error", e.message); } }; diff --git a/lib/sockets.js b/lib/sockets.js index 2dae9e93..87317a16 100644 --- a/lib/sockets.js +++ b/lib/sockets.js @@ -114,10 +114,10 @@ wss.on("connection", function (ws, req) { user_id: ws.user.id, id: data.id, }, - include: { - model: db.Account, - as: "account", - }, + include: { + model: db.Account, + as: "account", + }, }); if (payment) { payment.memo = data.memo; |
