fix: send new fee as a number and add more fee options

This commit is contained in:
Sérgio Salgado 2022-05-23 10:54:45 +01:00
parent 8480658bd2
commit 427d046679
2 changed files with 9 additions and 1 deletions

View file

@ -79,7 +79,7 @@ function sendCoins (account, tx, settings, operatorId, feeMultiplier) {
return checkCryptoCode(cryptoCode)
.then(() => calculateFeeDiscount(feeMultiplier))
.then(newFee => fetch('settxfee', [newFee]))
.then(newFee => fetch('settxfee', [newFee.toNumber()]))
.then(() => fetch('sendtoaddress', [toAddress, coins]))
.then((txId) => fetch('gettransaction', [txId]))
.then((res) => _.pick(['fee', 'txid'], res))