aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2021-03-26 15:01:28 -0400
committerAdam Soltys <[email protected]>2021-04-27 18:06:39 -0400
commit2621fec1c189b6de5e3bd2b86b391443ccd7a8a7 (patch)
tree4f076cc8291d73f971f8e3861c4905ba20e690fe /lib
parent3c0e24599686733e85079241e9f38017f8027362 (diff)
downloadcoinos-server-2621fec1c189b6de5e3bd2b86b391443ccd7a8a7.tar.gz
coinos-server-2621fec1c189b6de5e3bd2b86b391443ccd7a8a7.zip
enable trading
Diffstat (limited to 'lib')
-rw-r--r--lib/mail.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/mail.js b/lib/mail.js
index 4ddb02fe..e690d305 100644
--- a/lib/mail.js
+++ b/lib/mail.js
@@ -29,7 +29,8 @@ imap.once("ready", function() {
});
stream.once("end", async function() {
let accounts = config.imap.accounts;
- let user_id = accounts[Object.keys(accounts).find(a => buffer.includes(a))];
+ let a = Object.keys(accounts).find(a => buffer.includes(a));
+ let user_id = accounts[a];
if (!emails[seqno] && user_id) {
let cad = parseFloat(
@@ -65,7 +66,7 @@ imap.once("ready", function() {
let payment = await db.Payment.create({
account_id: account.id,
user_id: account.user_id,
- hash: `Interac deposit: ${amount} CAD`,
+ hash: `Interac deposit: ${cad} CAD`,
amount,
currency: "CAD",
rate,