From 3eee6730c118a2dade9fe2290ccc755c3bb399cf Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 11 Apr 2020 21:29:17 -0700 Subject: blind liquid tx during fee estimation --- routes/liquid/fee.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'routes/liquid') diff --git a/routes/liquid/fee.js b/routes/liquid/fee.js index 9dbb7e0a..6dcd57bd 100644 --- a/routes/liquid/fee.js +++ b/routes/liquid/fee.js @@ -21,9 +21,10 @@ module.exports = async (req, res) => { if (config.liquid.walletpass) await lq.walletPassphrase(config.liquid.walletpass, 300); - let signed = (await lq.signRawTransactionWithWallet(tx.hex)); + let blinded = await lq.blindRawTransaction(tx.hex); + let signed = (await lq.signRawTransactionWithWallet(blinded)); decoded = await lq.decodeRawTransaction(signed.hex); - feeRate = parseInt(tx.fee * SATS * 1000 / decoded.vsize); + feeRate = Math.round(tx.fee * SATS * 1000 / decoded.vsize); res.send({ feeRate, tx }); } catch (e) { -- cgit v1.2.3