fix: correct scale for fee
This commit is contained in:
parent
db468e7a6f
commit
575dbeabe5
1 changed files with 4 additions and 1 deletions
|
|
@ -87,7 +87,10 @@ function sendCoins (account, tx, settings, operatorId, feeMultiplier) {
|
||||||
|
|
||||||
return checkCryptoCode(cryptoCode)
|
return checkCryptoCode(cryptoCode)
|
||||||
.then(() => calculateFeeDiscount(feeMultiplier))
|
.then(() => calculateFeeDiscount(feeMultiplier))
|
||||||
.then(newFee => fetch('settxfee', [newFee]))
|
.then(it => {
|
||||||
|
const newFee = it.shiftedBy(-unitScale).toFixed(8)
|
||||||
|
return fetch('settxfee', [newFee])
|
||||||
|
})
|
||||||
.then(() => fetch('sendtoaddress', [toAddress, coins]))
|
.then(() => fetch('sendtoaddress', [toAddress, coins]))
|
||||||
.then((txId) => fetch('gettransaction', [txId]))
|
.then((txId) => fetch('gettransaction', [txId]))
|
||||||
.then((res) => _.pick(['fee', 'txid'], res))
|
.then((res) => _.pick(['fee', 'txid'], res))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue