From d47f44eeb1af61e55f46d0b95ecd6e55ca5c9558 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 30 Jan 2020 21:30:13 -0800 Subject: hardcode dev rates --- users.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'users.js') diff --git a/users.js b/users.js index 4d90eeac..55d70821 100644 --- a/users.js +++ b/users.js @@ -141,15 +141,19 @@ module.exports = (addresses, auth, app, bc, db, emit) => { user.username = username; } - user.currency = currency; user.currencies = currencies; + user.currency = currency; + if (currencies.length) { + if(!currencies.includes(currency)) user.currency = currencies[0]; + } else { + user.currency = null; + } + user.email = email; user.phone = phone; user.twofa = twofa; user.pin = pin; - console.log(user.currencies); - if (password && password === passconfirm) { user.password = await bcrypt.hash(password, 1); } -- cgit v1.2.3