diff options
| author | Adam Soltys <[email protected]> | 2020-09-28 02:30:35 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-09-28 02:30:35 -0700 |
| commit | 23f0a3a583e72513e25955b9117913fa7a52c9f8 (patch) | |
| tree | b340c7148a65d8fd571ff7d006227b13730da67e /lib | |
| parent | 462b926c1a7e319430600edbfe342976b1b025dd (diff) | |
| download | coinos-server-23f0a3a583e72513e25955b9117913fa7a52c9f8.tar.gz coinos-server-23f0a3a583e72513e25955b9117913fa7a52c9f8.zip | |
remove lock
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/account.js | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/account.js b/lib/account.js index 3a296a4c..931638e0 100644 --- a/lib/account.js +++ b/lib/account.js @@ -1,15 +1,16 @@ const axios = require("axios"); module.exports = async (asset, user, transaction) => { - const account = await db.Account.findOne({ - where: { - user_id: user.id, - asset, - pubkey: null + const account = await db.Account.findOne( + { + where: { + user_id: user.id, + asset, + pubkey: null + } }, - lock: transaction.LOCK.UPDATE, - transaction - }); + { transaction } + ); if (account) return account; @@ -33,9 +34,7 @@ module.exports = async (asset, user, transaction) => { }, order: [["id", "ASC"]], limit: 1, - lock: transaction.LOCK.UPDATE, - transaction - }); + }, { transaction }); if (existing) { ({ domain, ticker, precision, name } = existing); |
