Merge pull request #1240 from chaotixkilla/chore-fix-send-coins-batch-fee

Fix sendCoinsBatch() fee amount for BTC
This commit is contained in:
Rafael Taranto 2022-05-24 13:59:30 +01:00 committed by GitHub
commit fb00856cde

View file

@ -95,7 +95,7 @@ function sendCoins (account, tx, settings, operatorId, feeMultiplier) {
function sendCoinsBatch (account, txs, cryptoCode, feeMultiplier) { function sendCoinsBatch (account, txs, cryptoCode, feeMultiplier) {
return checkCryptoCode(cryptoCode) return checkCryptoCode(cryptoCode)
.then(() => calculateFeeDiscount(feeMultiplier)) .then(() => calculateFeeDiscount(feeMultiplier))
.then(newFee => fetch('settxfee', [newFee])) .then(newFee => fetch('settxfee', [newFee.toNumber()]))
.then(() => _.reduce((acc, value) => ({ .then(() => _.reduce((acc, value) => ({
...acc, ...acc,
[value.toAddress]: _.isNil(acc[value.toAddress]) [value.toAddress]: _.isNil(acc[value.toAddress])