aboutsummaryrefslogtreecommitdiffstats
path: root/routes/liquid
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-05-16 22:09:10 -0700
committerAdam Soltys <[email protected]>2020-05-16 22:09:10 -0700
commitf35282246da3a77d2d7e6dc193e12997832d1423 (patch)
tree23f64098c3f2cef7aa6cf68ab6754572117749e9 /routes/liquid
parent957b15980849e857995048dc13de8d8c6914f16d (diff)
downloadcoinos-server-f35282246da3a77d2d7e6dc193e12997832d1423.tar.gz
coinos-server-f35282246da3a77d2d7e6dc193e12997832d1423.zip
Revert "drop recaptcha"
This reverts commit 8a5496b3cd2e898e204367b8ca7c6e8f4d7b6055.
Diffstat (limited to 'routes/liquid')
-rw-r--r--routes/liquid/fee.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/routes/liquid/fee.js b/routes/liquid/fee.js
index 5b574544..6a884657 100644
--- a/routes/liquid/fee.js
+++ b/routes/liquid/fee.js
@@ -29,7 +29,7 @@ module.exports = async (req, res) => {
subtractFeeFromOutputs: amount === user.balance ? [0] : [],
};
- if (feeRate) params.feeRate = fixed(feeRate, 8);
+ if (feeRate) params.feeRate = (feeRate / SATS).toFixed(8);
tx = await lq.fundRawTransaction(tx, params);
@@ -41,6 +41,8 @@ module.exports = async (req, res) => {
decoded = await lq.decodeRawTransaction(signed.hex);
feeRate = Math.round((tx.fee * SATS * 1000) / decoded.vsize);
+ l.info("estimated", asset);
+
res.send({ feeRate, tx });
} catch (e) {
l.error("error estimating liquid fee", e);