aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrien Hopkins <[email protected]>2022-05-31 15:50:05 -0500
committerAdrien Hopkins <[email protected]>2022-05-31 15:50:05 -0500
commit510a3bf2f63cb6edbcc9ad24dacdf6faefd80c52 (patch)
tree9c214bd5be51d149cda9ff1901b8f97bf32b4eda
parent12af862f3601bc9c80c5c327ad094364431436e5 (diff)
downloadcoinos-server-510a3bf2f63cb6edbcc9ad24dacdf6faefd80c52.tar.gz
coinos-server-510a3bf2f63cb6edbcc9ad24dacdf6faefd80c52.zip
Allow UI to obtain data about withdrawal fees
-rw-r--r--lib/sockets.js11
1 files 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);