From 23f0a3a583e72513e25955b9117913fa7a52c9f8 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 28 Sep 2020 02:30:35 -0700 Subject: remove lock --- lib/account.js | 21 ++++++++++----------- 1 file 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); -- cgit v1.2.3