aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/binance.js6
-rw-r--r--lib/sockets.js8
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;