diff options
| author | Adam Soltys <[email protected]> | 2020-07-27 10:03:59 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-07-27 10:04:02 -0700 |
| commit | bfb643b82b559cb4ee78c6501d339920c6df8176 (patch) | |
| tree | 8cafe80075e0bc5b2ec35e0e4def91046ddcd532 /routes/send.js | |
| parent | 768bcc0107c98d145d4a663e8562a13666570941 (diff) | |
| download | coinos-server-bfb643b82b559cb4ee78c6501d339920c6df8176.tar.gz coinos-server-bfb643b82b559cb4ee78c6501d339920c6df8176.zip | |
add domain field to assets
Diffstat (limited to 'routes/send.js')
| -rw-r--r-- | routes/send.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/routes/send.js b/routes/send.js index f774e852..2fad326d 100644 --- a/routes/send.js +++ b/routes/send.js @@ -73,6 +73,7 @@ module.exports = async (req, res) => { await account.save({ transaction }); } else { let name = asset.substr(0, 6); + let domain; let ticker = asset.substr(0, 3).toUpperCase(); let precision = 8; @@ -80,7 +81,7 @@ module.exports = async (req, res) => { .data; if (assets[asset]) { - ({ ticker, precision, name } = assets[asset]); + ({ domain, ticker, precision, name } = assets[asset]); } else { const existing = await db.Account.findOne({ where: { @@ -93,12 +94,11 @@ module.exports = async (req, res) => { l.info("existing", existing); if (existing) { - l.info(existing.name); - ({ ticker, precision, name } = existing); + ({ domain, ticker, precision, name } = existing); } } - params = { ...params, ...{ ticker, precision, name } }; + params = { ...params, ...{ domain, ticker, precision, name } }; params.balance = amount; params.pending = 0; account = await db.Account.create(params, { transaction }); |
