aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/account.js7
-rw-r--r--lib/send.js1
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/account.js b/lib/account.js
index 5a8c3924..ac09a8e8 100644
--- a/lib/account.js
+++ b/lib/account.js
@@ -33,9 +33,10 @@ module.exports = async (asset, user, transaction) => {
asset
},
order: [["id", "ASC"]],
- limit: 1
+ limit: 1,
+ lock: transaction.LOCK.UPDATE,
+ transaction
},
- { transaction }
);
if (existing) {
@@ -46,5 +47,5 @@ module.exports = async (asset, user, transaction) => {
params = { ...params, ...{ domain, ticker, precision, name } };
params.balance = 0;
params.pending = 0;
- return db.Account.create(params);
+ return db.Account.create(params, { transaction });
};
diff --git a/lib/send.js b/lib/send.js
index 4e00f54a..a1052041 100644
--- a/lib/send.js
+++ b/lib/send.js
@@ -1,7 +1,6 @@
const bolt11 = require("bolt11");
send = async (amount, memo, hash, user) => {
- return res.status(500).send("Internal payments are temporarily disabled");
let payreq = bolt11.decode(hash);
if (!amount) amount = payreq.satoshis;