aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdrien Hopkins <[email protected]>2022-06-06 07:14:45 -0500
committerAdrien Hopkins <[email protected]>2022-06-06 07:14:45 -0500
commita2d2caf5eb29c6c804301e1faedd96856d57fcdc (patch)
tree930257d4ab30f89d3929e969739624758c815af5 /routes
parentc3a28b2d1b1c902f7b691d5fefe70cda573d954f (diff)
parent47aeb5f041db40ef964116bbb4fe22ee8e8f64dd (diff)
downloadcoinos-server-a2d2caf5eb29c6c804301e1faedd96856d57fcdc.tar.gz
coinos-server-a2d2caf5eb29c6c804301e1faedd96856d57fcdc.zip
Merge branch 'master' into feature-withdrawal-fee
Diffstat (limited to 'routes')
-rw-r--r--routes/liquid/fee.js12
-rw-r--r--routes/send.js4
2 files changed, 7 insertions, 9 deletions
diff --git a/routes/liquid/fee.js b/routes/liquid/fee.js
index fad69f13..253810a9 100644
--- a/routes/liquid/fee.js
+++ b/routes/liquid/fee.js
@@ -49,14 +49,12 @@ liquidTx = async ({ address, asset, amount, feeRate, replaceable, user }) => {
tx = await node.createRawTransaction(
[],
- {
- [address]: (amount / SATS).toFixed(8)
- },
+ [{
+ [address]: (amount / SATS).toFixed(8),
+ asset
+ }],
0,
replaceable,
- {
- [address]: asset
- }
);
l.info("funding tx for fee estimate", tx);
@@ -78,7 +76,7 @@ module.exports = ah(async (req, res) => {
let tx = await liquidTx({ ...req.body, user: req.user })
res.send(tx);
} catch (e) {
- l.error("error estimating liquid fee", e.message);
+ l.error("error estimating liquid fee", e.message, e.stack);
return res.status(500).send(e.message);
}
});
diff --git a/routes/send.js b/routes/send.js
index 5f1151c5..4c8afa34 100644
--- a/routes/send.js
+++ b/routes/send.js
@@ -61,7 +61,7 @@ module.exports = ah(async (req, res, next) => {
rate: app.get("rates")[user.currency],
currency: user.currency,
confirmed: true,
- hash: username ? `Payment to ${username}` : "Internal Transfer",
+ hash: `#${uuidv4().substr(0, 6)} ${(username ? `Payment to ${username}` : "Internal Transfer")}`,
network: "COINOS"
};
@@ -165,7 +165,7 @@ module.exports = ah(async (req, res, next) => {
rate: app.get("rates")[recipient.currency] * spread,
currency: recipient.currency,
confirmed: true,
- hash: "Payment from " + user.username,
+ hash: `#${uuidv4().substr(0,6)} Payment from ${user.username}`,
memo,
network: "COINOS",
received: true