feat: support new advanced wallet settings
This commit is contained in:
parent
4120d58a1b
commit
ba72786dcb
7 changed files with 32 additions and 27 deletions
|
|
@ -11,6 +11,8 @@ const unitScale = cryptoRec.unitScale
|
|||
|
||||
const rpcConfig = jsonRpc.rpcConfig(cryptoRec)
|
||||
|
||||
const SUPPORTS_BATCHING = true
|
||||
|
||||
function fetch (method, params) {
|
||||
return jsonRpc.fetch(rpcConfig, method, params)
|
||||
}
|
||||
|
|
@ -63,7 +65,10 @@ function sendCoins (account, tx, settings, operatorId, feeMultiplier) {
|
|||
|
||||
return checkCryptoCode(cryptoCode)
|
||||
.then(() => calculateFeeDiscount(feeMultiplier))
|
||||
.then(newFee => fetch('settxfee', [newFee]))
|
||||
.then(newFee => {
|
||||
console.log('** DEBUG MINERS FEE ** - Calculated fee discount: ', newFee)
|
||||
return fetch('settxfee', [newFee])
|
||||
})
|
||||
.then(() => fetch('sendtoaddress', [toAddress, coins]))
|
||||
.then((txId) => fetch('gettransaction', [txId]))
|
||||
.then((res) => _.pick(['fee', 'txid'], res))
|
||||
|
|
@ -186,5 +191,6 @@ module.exports = {
|
|||
fetchRBF,
|
||||
estimateFee,
|
||||
sendCoinsBatch,
|
||||
checkBlockchainStatus
|
||||
checkBlockchainStatus,
|
||||
SUPPORTS_BATCHING
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue