diff options
| author | Adam Soltys <[email protected]> | 2022-09-06 09:20:25 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-09-06 09:20:25 -0700 |
| commit | c2464b2407ee23134732fd67586758dbfe18f9b5 (patch) | |
| tree | 3e2d9f009bb325a9a7c4304ea02f6e64dda85bd1 /lib/account.js | |
| parent | 8a080ef9a198799e7ee31cf81f92afd5495e4074 (diff) | |
| download | coinos-server-c2464b2407ee23134732fd67586758dbfe18f9b5.tar.gz coinos-server-c2464b2407ee23134732fd67586758dbfe18f9b5.zip | |
prettier
Diffstat (limited to 'lib/account.js')
| -rw-r--r-- | lib/account.js | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/account.js b/lib/account.js index a1f20dc7..6edb3fc1 100644 --- a/lib/account.js +++ b/lib/account.js @@ -1,4 +1,4 @@ -import axios from 'axios'; +import axios from "axios"; export default async (asset, user, transaction) => { const account = await db.Account.findOne({ @@ -27,17 +27,15 @@ export default async (asset, user, transaction) => { if (assets[asset]) { ({ domain, ticker, precision, name } = assets[asset]); } else { - const existing = await db.Account.findOne( - { - where: { - asset - }, - order: [["id", "ASC"]], - limit: 1, + const existing = await db.Account.findOne({ + where: { + asset + }, + order: [["id", "ASC"]], + limit: 1, lock: transaction.LOCK.UPDATE, transaction - }, - ); + }); if (existing) { ({ domain, ticker, precision, name } = existing); |
