fix: send new fee as a number and add more fee options
This commit is contained in:
parent
8480658bd2
commit
427d046679
2 changed files with 9 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -58,10 +58,18 @@ const viewFeeMultiplier = it =>
|
|||
R.compose(R.prop(['display']), R.find(R.propEq('code', it)))(feeOptions)
|
||||
|
||||
const feeOptions = [
|
||||
{ display: '+60%', code: '1.6' },
|
||||
{ display: '+50%', code: '1.5' },
|
||||
{ display: '+40%', code: '1.4' },
|
||||
{ display: '+30%', code: '1.3' },
|
||||
{ display: '+20%', code: '1.2' },
|
||||
{ display: '+10%', code: '1.1' },
|
||||
{ display: 'Default', code: '1' },
|
||||
{ display: '-10%', code: '0.9' },
|
||||
{ display: '-20%', code: '0.8' },
|
||||
{ display: '-30%', code: '0.7' },
|
||||
{ display: '-40%', code: '0.6' },
|
||||
{ display: '-50%', code: '0.5' },
|
||||
{ display: '-60%', code: '0.4' }
|
||||
]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue