From c2e8ed612bb189e8e45b0f07a19ccde343952785 Mon Sep 17 00:00:00 2001 From: csrapr <26280794+csrapr@users.noreply.github.com> Date: Fri, 11 Jun 2021 11:27:34 +0100 Subject: [PATCH] Fix: remove unnecessary state variable for zeroConfLimit --- new-lamassu-admin/src/pages/Wallet/helper.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/new-lamassu-admin/src/pages/Wallet/helper.js b/new-lamassu-admin/src/pages/Wallet/helper.js index d2a9bba3..20996fd1 100644 --- a/new-lamassu-admin/src/pages/Wallet/helper.js +++ b/new-lamassu-admin/src/pages/Wallet/helper.js @@ -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
{it}
- 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' ? {it} : it, input: NumberInput, width: 190 - widthAdjust, inputProps: {