aboutsummaryrefslogtreecommitdiffstats
path: root/routes/send.js
diff options
context:
space:
mode:
Diffstat (limited to 'routes/send.js')
-rw-r--r--routes/send.js10
1 files changed, 1 insertions, 9 deletions
diff --git a/routes/send.js b/routes/send.js
index aea0a858..e2836b82 100644
--- a/routes/send.js
+++ b/routes/send.js
@@ -10,14 +10,7 @@ module.exports = ah(async (req, res, next) => {
try {
await db.transaction(async transaction => {
- let account = await db.Account.findOne({
- where: {
- user_id: user.id,
- asset
- },
- lock: transaction.LOCK.UPDATE,
- transaction
- });
+ let { account } = user;
if (account.balance < amount) {
throw new Error("Insufficient funds");
@@ -149,7 +142,6 @@ module.exports = ah(async (req, res, next) => {
user.username,
user.balance,
e.message,
- e.stack
);
return res.status(500).send(e.message);
}