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 WizardStep from './WizardStep'
import { has0Conf } from './helper'
const MAX_STEPS = 5
const MODAL_WIDTH = 554
@ -69,21 +70,27 @@ const Wizard = ({
!R.isEmpty(zeroConfs.filled) ||
(!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
? R.concat(commonWizardSteps, [
{
type: 'zeroConf',
name: 'confidence checking',
schema: Yup.object().shape({
zeroConfLimit: Yup.number().required()
}),
...zeroConfs
},
{
type: 'zeroConfLimit',
name: '0-conf limit'
}
])
? R.concat(
commonWizardSteps,
has0Conf(coin)
? [confidenceCheckingStep]
: [confidenceCheckingStep, zeroConfLimitStep]
)
: commonWizardSteps
const lastStep = wizardSteps.length

View file

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