aboutsummaryrefslogtreecommitdiffstats
path: root/routes/send.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-09-27 13:25:59 -0700
committerAdam Soltys <[email protected]>2020-09-27 13:25:59 -0700
commit8d42a328880dae07960c56a81649583aab0e71f3 (patch)
tree2fcb671868c742c420c1c2bbb5f0c2587d248a14 /routes/send.js
parent4849c6ac324df67d2f5fc20ed4a958fe9a2bfa1f (diff)
downloadcoinos-server-8d42a328880dae07960c56a81649583aab0e71f3.tar.gz
coinos-server-8d42a328880dae07960c56a81649583aab0e71f3.zip
use account foreign keys in proposals table
Diffstat (limited to 'routes/send.js')
-rw-r--r--routes/send.js9
1 files changed, 4 insertions, 5 deletions
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);