diff --git a/src/pages/ValidatorOnboarding/KeyGeneration/ConfirmRecoveryPhrase.tsx b/src/pages/ValidatorOnboarding/KeyGeneration/ConfirmRecoveryPhrase.tsx
new file mode 100644
index 00000000..02957565
--- /dev/null
+++ b/src/pages/ValidatorOnboarding/KeyGeneration/ConfirmRecoveryPhrase.tsx
@@ -0,0 +1,14 @@
+import { YStack } from 'tamagui'
+import KeyGenerationTitle from './KeyGenerationTitle'
+import { Text } from '@status-im/components'
+
+const ConfirmRecoveryPhrase = () => {
+ return (
+
+
+ Confirm Recovery Phrase
+
+ )
+}
+
+export default ConfirmRecoveryPhrase
diff --git a/src/pages/ValidatorOnboarding/KeyGeneration/KeyFiles.tsx b/src/pages/ValidatorOnboarding/KeyGeneration/KeyFiles.tsx
index d4966d30..cc0c105e 100644
--- a/src/pages/ValidatorOnboarding/KeyGeneration/KeyFiles.tsx
+++ b/src/pages/ValidatorOnboarding/KeyGeneration/KeyFiles.tsx
@@ -1,10 +1,8 @@
-import { XStack, YStack } from 'tamagui'
+import { Stack, XStack, YStack } from 'tamagui'
import { Button, InformationBox, Input, Text } from '@status-im/components'
import { ClearIcon, CloseCircleIcon } from '@status-im/icons'
import { useState } from 'react'
-import BorderBox from '../../../components/General/BorderBox'
-
const KeyFiles = () => {
const [encryptedPassword, setEncryptedPassword] = useState('')
const [confirmEncryptedPassword, setConfirmEncryptedPassword] = useState('')
@@ -28,10 +26,10 @@ const KeyFiles = () => {
}
return (
-
-
-
-
+
+
+
+
Encryption Password
@@ -68,13 +66,23 @@ const KeyFiles = () => {
/>
-
+
Download Key Files
-
+
-
+
+
+
{
+type KeyGenerationProps = {
+ isConfirmPhraseStage: boolean
+}
+
+const KeyGeneration = ({ isConfirmPhraseStage }: KeyGenerationProps) => {
const [recoveryMechanism, setRecoveryMechanism] = useState(KEY_FILES)
- const handleRecMechanismChange = (value: string) => {
- setRecoveryMechanism(value)
- }
-
const isKeyFiles = recoveryMechanism === KEY_FILES || recoveryMechanism === BOTH_KEY_AND_RECOVERY
const isRecoveryPhrase =
recoveryMechanism === RECOVERY_PHRASE || recoveryMechanism === BOTH_KEY_AND_RECOVERY
+ const handleRecMechanismChange = (value: string) => {
+ setRecoveryMechanism(value)
+ }
+
return (
-
-
-
- 4 Validators
-
- {isKeyFiles && }
- {isRecoveryPhrase && }
+ {isConfirmPhraseStage && }
+ {isConfirmPhraseStage === false && (
+ <>
+
+
+
+
+ 4 Validators
+
+
+ {isKeyFiles && }
+ {isRecoveryPhrase && }
+ >
+ )}
)
}
diff --git a/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanism.tsx b/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanism.tsx
index eeae39cd..9bafac31 100644
--- a/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanism.tsx
+++ b/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanism.tsx
@@ -1,5 +1,6 @@
import { Text } from '@status-im/components'
import { XStack, YStack } from 'tamagui'
+
import RecoveryMechanismCard from './RecoveryMechanismCard'
import { BOTH_KEY_AND_RECOVERY, KEY_FILES, RECOVERY_PHRASE } from '../../../constants'
@@ -8,6 +9,8 @@ type RecoveryMechanismProps = {
handleRecMechanismChange: (value: string) => void
}
+const cards = [KEY_FILES, RECOVERY_PHRASE, BOTH_KEY_AND_RECOVERY]
+
const RecoveryMechanism = ({
recoveryMechanism,
handleRecMechanismChange,
@@ -18,21 +21,14 @@ const RecoveryMechanism = ({
Select Recovery Mechanism
-
-
-
+ {cards.map(value => (
+
+ ))}
)
diff --git a/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryPhrase.tsx b/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryPhrase.tsx
index aa2ffcf0..cd28c1f0 100644
--- a/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryPhrase.tsx
+++ b/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryPhrase.tsx
@@ -1,11 +1,39 @@
-import { YStack } from 'tamagui'
-import { Button, InformationBox } from '@status-im/components'
+import { Stack, YStack } from 'tamagui'
+import { Button, InformationBox, Text } from '@status-im/components'
import { CloseCircleIcon } from '@status-im/icons'
+import { useState } from 'react'
+
+type RecoveryPhraseProps = {
+ isKeyFiles: boolean
+}
+
+const RecoveryPhrase = ({ isKeyFiles }: RecoveryPhraseProps) => {
+ const [isReveal, setIsReveal] = useState(false)
+
+ const revealHandler = () => {
+ setIsReveal(state => !state)
+ }
-const RecoveryPhrase = () => {
return (
-
-
+
+
+
+
+ asdf
+
+
+
+
+
+
{
const [activeStep, setActiveStep] = useState(0)
+ const [isConfirmPhraseStage, setIsConfirmPhraseStage] = useState(false)
const navigate = useNavigate()
const changeActiveStep = (step: number) => {
@@ -21,7 +22,9 @@ const ValidatorOnboarding = () => {
}
const continueHandler = () => {
- if (activeStep < 4) {
+ if (activeStep === 3 && isConfirmPhraseStage === false) {
+ setIsConfirmPhraseStage(true)
+ } else if (activeStep < 4) {
setActiveStep(activeStep + 1)
} else {
navigate('/')
@@ -49,7 +52,7 @@ const ValidatorOnboarding = () => {
{activeStep === 0 && }
{activeStep === 1 && }
{activeStep === 2 && }
- {activeStep === 3 && }
+ {activeStep === 3 && }
{activeStep === 4 && }
diff --git a/src/pages/ValidatorOnboarding/ValidatorSetup/ValidatorSetup.stories.ts b/src/pages/ValidatorOnboarding/ValidatorSetup/ValidatorSetup.stories.ts
index e4e3f07a..b8905326 100644
--- a/src/pages/ValidatorOnboarding/ValidatorSetup/ValidatorSetup.stories.ts
+++ b/src/pages/ValidatorOnboarding/ValidatorSetup/ValidatorSetup.stories.ts
@@ -1,6 +1,7 @@
import type { Meta, StoryObj } from '@storybook/react'
import ValidatorSetup from './ValidatorSetup'
+import { withRouter } from 'storybook-addon-react-router-v6'
const meta = {
title: 'ValidatorOnboarding/ValidatorSetup',
@@ -10,6 +11,7 @@ const meta = {
},
tags: ['autodocs'],
argTypes: {},
+ decorators: [withRouter()],
} satisfies Meta
export default meta
diff --git a/src/pages/ValidatorOnboarding/ValidatorSetup/ValidatorSetup.tsx b/src/pages/ValidatorOnboarding/ValidatorSetup/ValidatorSetup.tsx
index 6d320492..658bacfa 100644
--- a/src/pages/ValidatorOnboarding/ValidatorSetup/ValidatorSetup.tsx
+++ b/src/pages/ValidatorOnboarding/ValidatorSetup/ValidatorSetup.tsx
@@ -4,31 +4,32 @@ import { Text } from '@status-im/components'
import ExecClientCard from './ExecClientCard'
import { Link } from 'react-router-dom'
+const execClientCardsContent = [
+ {
+ name: 'Nethermind',
+ icon: '/icons/nethermind-circle.png',
+ },
+ {
+ name: 'Besu',
+ icon: '/icons/hyperledger-besu-circle.png',
+ },
+ {
+ name: 'Geth',
+ icon: '/icons/gethereum-mascot-circle.png',
+ isSelected: true,
+ },
+ {
+ name: 'Erigon',
+ icon: '/icons/erigon-circle.png',
+ },
+ {
+ name: 'Nimbus',
+ icon: '/icons/NimbusDisabled.svg',
+ isComingSoon: true,
+ },
+]
+
const ValidatorSetup = () => {
- const execClientCardsContent = [
- {
- name: 'Nethermind',
- icon: '/icons/nethermind-circle.png',
- },
- {
- name: 'Besu',
- icon: '/icons/hyperledger-besu-circle.png',
- },
- {
- name: 'Geth',
- icon: '/icons/gethereum-mascot-circle.png',
- isSelected: true,
- },
- {
- name: 'Erigon',
- icon: '/icons/erigon-circle.png',
- },
- {
- name: 'Nimbus',
- icon: '/icons/NimbusDisabled.svg',
- isComingSoon: true,
- },
- ]
return (