diff options
| author | Adam Soltys <[email protected]> | 2020-01-29 14:33:51 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-01-29 14:33:51 -0800 |
| commit | c3ed4317d37f1c760392d9a89610d07ccd3a7d03 (patch) | |
| tree | 3c73ea9e8ee04c0585a3dce4eb5de5a8f2634100 /users.js | |
| parent | e34f41697eb4b96508dc27197b91ef06bd47a641 (diff) | |
| download | coinos-server-c3ed4317d37f1c760392d9a89610d07ccd3a7d03.tar.gz coinos-server-c3ed4317d37f1c760392d9a89610d07ccd3a7d03.zip | |
set payment currency
Diffstat (limited to 'users.js')
| -rw-r--r-- | users.js | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -44,6 +44,7 @@ module.exports = (addresses, auth, app, bc, db, emit) => { user.password = await bcrypt.hash(user.password, 1); user.name = user.username; user.currency = "USD"; + user.currencies = ["USD"]; addresses[user.address] = user.username; addresses[user.liquid] = user.username; @@ -106,6 +107,7 @@ module.exports = (addresses, auth, app, bc, db, emit) => { let { username, currency, + currencies, email, phone, twofa, @@ -139,11 +141,14 @@ module.exports = (addresses, auth, app, bc, db, emit) => { } user.currency = currency; + user.currencies = currencies; 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); } |
