diff options
| author | Adam Soltys <[email protected]> | 2020-09-24 23:49:37 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-09-24 23:49:37 -0700 |
| commit | 072dd8dcce4f28eba78838855f6ae977b868c8b6 (patch) | |
| tree | b2cc322a0ee82355460b61a7a7148072eca0086e /lib | |
| parent | a6534130b7d6d4f1659e6419b181b7208767ff73 (diff) | |
| download | coinos-server-072dd8dcce4f28eba78838855f6ae977b868c8b6.tar.gz coinos-server-072dd8dcce4f28eba78838855f6ae977b868c8b6.zip | |
order matching
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/account.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/account.js b/lib/account.js index 27ef830a..ca3ce7ea 100644 --- a/lib/account.js +++ b/lib/account.js @@ -1,11 +1,14 @@ const axios = require("axios"); -module.exports = async (asset, user) => { +module.exports = async (asset, user, transaction) => { const account = await db.Account.findOne({ where: { user_id: user.id, asset, + pubkey: null, }, + lock: transaction.LOCK.UPDATE, + transaction, }); if (account) return account; @@ -30,6 +33,8 @@ module.exports = async (asset, user) => { }, order: [["id", "ASC"]], limit: 1, + lock: transaction.LOCK.UPDATE, + transaction, }); if (existing) { |
