Merge pull request #1221 from chaotixkilla/fix-remove-0conf-opt-eth

Remove ETH wizard setup 0-conf step
This commit is contained in:
Rafael Taranto 2022-05-18 07:31:20 +01:00 committed by GitHub
commit f8223df4c8
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
}