Skip to content

Commit

Permalink
fix: missing var, removing testing leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelTaranto committed Jan 25, 2024
1 parent d7ad8c9 commit bf9ad42
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/plugins/wallet/bitcoind/bitcoind.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ function calculateFeeDiscount (feeMultiplier = 1, unitScale) {
}
// transform from sat/vB to BTC/kvB and apply the multipler
const newFee = estimatedFee.shiftedBy(-unitScale+3).times(feeMultiplier)
console.log(newFee.toFixed())
if (newFee.lt(0.00001) || newFee.gt(0.1)) {
logger.info('fee outside safety parameters, defaulting to automatic fee selection')
return AUTOMATIC_FEE
Expand All @@ -89,7 +88,7 @@ function sendCoins (account, tx, settings, operatorId, feeMultiplier) {

return checkCryptoCode(cryptoCode)
.then(() => calculateFeeDiscount(feeMultiplier, unitScale))
.then(() => fetch('settxfee', [newFee]))
.then(newFee => fetch('settxfee', [newFee]))
.then(() => fetch('sendtoaddress', [toAddress, coins]))
.then((txId) => fetch('gettransaction', [txId]))
.then((res) => _.pick(['fee', 'txid'], res))
Expand Down Expand Up @@ -208,8 +207,6 @@ function getTxHashesByAddress (cryptoCode, address) {
.then(_.map(({ hash }) => hash))
}

calculateFeeDiscount(1, 8).then(console.log)

module.exports = {
balance,
sendCoins,
Expand All @@ -218,7 +215,6 @@ module.exports = {
newFunding,
cryptoNetwork,
fetchRBF,
estimateFee,
sendCoinsBatch,
checkBlockchainStatus,
getTxHashesByAddress,
Expand Down

0 comments on commit bf9ad42

Please sign in to comment.