fix: remove ETH 0-conf wizard step

This commit is contained in:
Sérgio Salgado 2022-05-13 19:31:11 +01:00
parent 1b44a40903
commit 79ed8af1cb
2 changed files with 23 additions and 15 deletions

View file

@ -9,6 +9,7 @@ import { toNamespace } from 'src/utils/config'
import WizardSplash from './WizardSplash' import WizardSplash from './WizardSplash'
import WizardStep from './WizardStep' import WizardStep from './WizardStep'
import { has0Conf } from './helper'
const MAX_STEPS = 5 const MAX_STEPS = 5
const MODAL_WIDTH = 554 const MODAL_WIDTH = 554
@ -69,21 +70,27 @@ const Wizard = ({
!R.isEmpty(zeroConfs.filled) || !R.isEmpty(zeroConfs.filled) ||
(!R.isNil(zeroConfs.unfilled) && !R.isEmpty(zeroConfs.unfilled)) (!R.isNil(zeroConfs.unfilled) && !R.isEmpty(zeroConfs.unfilled))
const confidenceCheckingStep = {
type: 'zeroConf',
name: 'confidence checking',
schema: Yup.object().shape({
zeroConfLimit: Yup.number().required()
}),
...zeroConfs
}
const zeroConfLimitStep = {
type: 'zeroConfLimit',
name: '0-conf limit'
}
const wizardSteps = hasZeroConfs const wizardSteps = hasZeroConfs
? R.concat(commonWizardSteps, [ ? R.concat(
{ commonWizardSteps,
type: 'zeroConf', has0Conf(coin)
name: 'confidence checking', ? [confidenceCheckingStep]
schema: Yup.object().shape({ : [confidenceCheckingStep, zeroConfLimitStep]
zeroConfLimit: Yup.number().required() )
}),
...zeroConfs
},
{
type: 'zeroConfLimit',
name: '0-conf limit'
}
])
: commonWizardSteps : commonWizardSteps
const lastStep = wizardSteps.length const lastStep = wizardSteps.length

View file

@ -313,5 +313,6 @@ export {
getAdvancedWalletElements, getAdvancedWalletElements,
getAdvancedWalletElementsOverrides, getAdvancedWalletElementsOverrides,
OverridesDefaults, OverridesDefaults,
OverridesSchema OverridesSchema,
has0Conf
} }