Fix: remove unnecessary state variable for zeroConfLimit
This commit is contained in:
parent
d1db0b95c8
commit
c2e8ed612b
1 changed files with 2 additions and 9 deletions
|
|
@ -27,14 +27,12 @@ const WalletSchema = Yup.object().shape({
|
|||
})
|
||||
|
||||
const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
|
||||
let currentCurrency = ''
|
||||
const widthAdjust = wizard ? 11 : 0
|
||||
const viewCryptoCurrency = it => {
|
||||
const currencyDisplay = R.compose(
|
||||
R.prop(['display']),
|
||||
R.find(R.propEq('code', it))
|
||||
)(cryptoCurrencies)
|
||||
currentCurrency = currencyDisplay
|
||||
return currencyDisplay
|
||||
}
|
||||
const filterOptions = type => filterClass(type)(accounts || [])
|
||||
|
|
@ -49,12 +47,6 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
|
|||
filterCoins(it)(filterOptions(option))
|
||||
)
|
||||
|
||||
const getZeroConfLimit = it => {
|
||||
if (currentCurrency === 'Ethereum')
|
||||
return <div style={classes.editDisabled}>{it}</div>
|
||||
return it
|
||||
}
|
||||
|
||||
return [
|
||||
{
|
||||
name: 'id',
|
||||
|
|
@ -127,7 +119,8 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
|
|||
name: 'zeroConfLimit',
|
||||
size: 'sm',
|
||||
stripe: true,
|
||||
view: getZeroConfLimit,
|
||||
view: (it, row) =>
|
||||
row.id === 'ETH' ? <span style={classes.editDisabled}>{it}</span> : it,
|
||||
input: NumberInput,
|
||||
width: 190 - widthAdjust,
|
||||
inputProps: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue