diff options
Diffstat (limited to 'users.js')
| -rw-r--r-- | users.js | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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); } |
