diff options
| author | Adam Soltys <[email protected]> | 2022-09-07 15:03:40 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-09-07 15:03:40 -0700 |
| commit | 5afcf12b214a3c81f00cfc03f892e299fceeac71 (patch) | |
| tree | 7e0a428949573896ea58e8595e67dcc644e49dbe /lib/account.js | |
| parent | 3e11c9e4aa3618e58af413c98d6992ae18d444f7 (diff) | |
| download | coinos-server-5afcf12b214a3c81f00cfc03f892e299fceeac71.tar.gz coinos-server-5afcf12b214a3c81f00cfc03f892e299fceeac71.zip | |
es6 migration
Diffstat (limited to 'lib/account.js')
| -rw-r--r-- | lib/account.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/account.js b/lib/account.js index 6edb3fc1..1576546a 100644 --- a/lib/account.js +++ b/lib/account.js @@ -1,4 +1,6 @@ import axios from "axios"; +import db from "$db"; +import store from "$lib/store"; export default async (asset, user, transaction) => { const account = await db.Account.findOne({ @@ -22,10 +24,8 @@ export default async (asset, user, transaction) => { let ticker = asset.substr(0, 3).toUpperCase(); let precision = 8; - const assets = assets; - - if (assets[asset]) { - ({ domain, ticker, precision, name } = assets[asset]); + if (store.assets[asset]) { + ({ domain, ticker, precision, name } = store.assets[asset]); } else { const existing = await db.Account.findOne({ where: { |
