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) => {
|
const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
|
||||||
let currentCurrency = ''
|
|
||||||
const widthAdjust = wizard ? 11 : 0
|
const widthAdjust = wizard ? 11 : 0
|
||||||
const viewCryptoCurrency = it => {
|
const viewCryptoCurrency = it => {
|
||||||
const currencyDisplay = R.compose(
|
const currencyDisplay = R.compose(
|
||||||
R.prop(['display']),
|
R.prop(['display']),
|
||||||
R.find(R.propEq('code', it))
|
R.find(R.propEq('code', it))
|
||||||
)(cryptoCurrencies)
|
)(cryptoCurrencies)
|
||||||
currentCurrency = currencyDisplay
|
|
||||||
return currencyDisplay
|
return currencyDisplay
|
||||||
}
|
}
|
||||||
const filterOptions = type => filterClass(type)(accounts || [])
|
const filterOptions = type => filterClass(type)(accounts || [])
|
||||||
|
|
@ -49,12 +47,6 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
|
||||||
filterCoins(it)(filterOptions(option))
|
filterCoins(it)(filterOptions(option))
|
||||||
)
|
)
|
||||||
|
|
||||||
const getZeroConfLimit = it => {
|
|
||||||
if (currentCurrency === 'Ethereum')
|
|
||||||
return <div style={classes.editDisabled}>{it}</div>
|
|
||||||
return it
|
|
||||||
}
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
name: 'id',
|
name: 'id',
|
||||||
|
|
@ -127,7 +119,8 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
|
||||||
name: 'zeroConfLimit',
|
name: 'zeroConfLimit',
|
||||||
size: 'sm',
|
size: 'sm',
|
||||||
stripe: true,
|
stripe: true,
|
||||||
view: getZeroConfLimit,
|
view: (it, row) =>
|
||||||
|
row.id === 'ETH' ? <span style={classes.editDisabled}>{it}</span> : it,
|
||||||
input: NumberInput,
|
input: NumberInput,
|
||||||
width: 190 - widthAdjust,
|
width: 190 - widthAdjust,
|
||||||
inputProps: {
|
inputProps: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue