From 8d42a328880dae07960c56a81649583aab0e71f3 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 27 Sep 2020 13:25:59 -0700 Subject: use account foreign keys in proposals table --- routes/send.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'routes/send.js') diff --git a/routes/send.js b/routes/send.js index e2836b82..ab67bfaa 100644 --- a/routes/send.js +++ b/routes/send.js @@ -57,7 +57,8 @@ module.exports = ah(async (req, res, next) => { model: db.Account, as: "account" } - }); + }, + { transaction }); let a2; let acc = { @@ -71,9 +72,7 @@ module.exports = ah(async (req, res, next) => { else { a2 = await db.Account.findOne({ where: acc, - lock: transaction.LOCK.UPDATE, - transaction - }); + }, { transaction }); } if (a2) { @@ -96,7 +95,7 @@ module.exports = ah(async (req, res, next) => { }, order: [["id", "ASC"]], limit: 1 - }); + }, { transaction }); if (existing) { ({ domain, ticker, precision, name } = existing); -- cgit v1.2.3