From 510a3bf2f63cb6edbcc9ad24dacdf6faefd80c52 Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Tue, 31 May 2022 15:50:05 -0500 Subject: Allow UI to obtain data about withdrawal fees --- lib/sockets.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/sockets.js b/lib/sockets.js index e876663b..30a6b49d 100644 --- a/lib/sockets.js +++ b/lib/sockets.js @@ -121,11 +121,16 @@ wss.on("connection", function(ws, req) { }, order: [["id", "DESC"]], limit: 12, - include: { + include: [{ model: db.Account, as: "account" - } + }, + { + model: db.Payment, + as: "fee_payment" + }] }); + let accounts = await user.getAccounts(); let keys = await user.getKeys(); user = user.get({ plain: true }); @@ -143,7 +148,7 @@ wss.on("connection", function(ws, req) { if (e.message.includes("locked")) { ws.send(JSON.stringify({ type: "locked" })); ws.send(JSON.stringify({ type: "logout" })); - } + } if (e.message.includes("not found")) ws.send(JSON.stringify({ type: "logout" })); setTimeout(() => ws && ws.close(), 1000); -- cgit v1.2.3