aboutsummaryrefslogtreecommitdiffstats
path: root/routes/send.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-08-26 10:48:29 -0700
committerAdam Soltys <[email protected]>2022-08-26 10:48:29 -0700
commita86552b716837e227788e52cd559ae4f1ec07a01 (patch)
tree79b5260c9350f481903585614366e302fc9c7e46 /routes/send.js
parent05b5dc758285a5f396f9973fa91bd5643dbbbc7a (diff)
downloadcoinos-server-a86552b716837e227788e52cd559ae4f1ec07a01.tar.gz
coinos-server-a86552b716837e227788e52cd559ae4f1ec07a01.zip
combine compose yml files
Diffstat (limited to 'routes/send.js')
-rw-r--r--routes/send.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/routes/send.js b/routes/send.js
index 0c93d0a2..7c6728a1 100644
--- a/routes/send.js
+++ b/routes/send.js
@@ -31,8 +31,7 @@ module.exports = ah(async (req, res, next) => {
lock: transaction.LOCK.UPDATE,
transaction
});
- }
- else {
+ } else {
account = await db.Account.findOne({
where: {
user_id: user.id,
@@ -61,7 +60,9 @@ module.exports = ah(async (req, res, next) => {
rate: app.get("rates")[user.currency],
currency: user.currency,
confirmed: true,
- hash: `#${uuidv4().substr(0, 6)} ${(username ? `Payment to ${username}` : "Internal Transfer")}`,
+ hash: `#${uuidv4().substr(0, 6)} ${
+ username ? `Payment to ${username}` : "Internal Transfer"
+ }`,
network: "COINOS"
};
@@ -99,7 +100,7 @@ module.exports = ah(async (req, res, next) => {
};
if (address) params.where.address = address;
else if (payreq) params.where.text = payreq;
- let invoice = (address || payreq) && await db.Invoice.findOne(params);
+ let invoice = (address || payreq) && (await db.Invoice.findOne(params));
let a2;
let acc = {
@@ -164,7 +165,7 @@ module.exports = ah(async (req, res, next) => {
rate: app.get("rates")[recipient.currency] * spread,
currency: recipient.currency,
confirmed: true,
- hash: `#${uuidv4().substr(0,6)} Payment from ${user.username}`,
+ hash: `#${uuidv4().substr(0, 6)} Payment from ${user.username}`,
memo,
network: "COINOS",
received: true