diff --git a/src/pages/ValidatorOnboarding/KeyGeneration/KeyGeneration.tsx b/src/pages/ValidatorOnboarding/KeyGeneration/KeyGeneration.tsx index 8ecf8033..94ec1d5c 100644 --- a/src/pages/ValidatorOnboarding/KeyGeneration/KeyGeneration.tsx +++ b/src/pages/ValidatorOnboarding/KeyGeneration/KeyGeneration.tsx @@ -5,13 +5,13 @@ import { Text } from '@status-im/components' import KeyFiles from './KeyFiles' import { useState } from 'react' import RecoveryPhrase from './RecoveryPhrase' -import { KEY_FILES, RECOVERY_PHRASE } from '../../../constants' +import { BOTH_KEY_AND_RECOVERY, KEY_FILES, RECOVERY_PHRASE } from '../../../constants' const KeyGeneration = () => { - const [selectedRecoveryMechanism, setSelectedRecoveryMechanism] = useState(KEY_FILES) + const [recoveryMechanism, setRecoveryMechanism] = useState(KEY_FILES) - const handleRecoveryMechanismChange = (value: string) => { - setSelectedRecoveryMechanism(value) + const handleRecMechanismChange = (value: string) => { + setRecoveryMechanism(value) } const isKeyFiles = recoveryMechanism === KEY_FILES || recoveryMechanism === BOTH_KEY_AND_RECOVERY @@ -23,8 +23,8 @@ const KeyGeneration = () => { 4 Validators diff --git a/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanism.stories.ts b/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanism.stories.ts index 02ad657a..7ebf70bc 100644 --- a/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanism.stories.ts +++ b/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanism.stories.ts @@ -18,7 +18,7 @@ type Story = StoryObj export const Page: Story = { args: { - selectedRecoveryMechanism: KEY_FILES, - handleRecoveryMechanismChange: () => {}, + recoveryMechanism: KEY_FILES, + handleRecMechanismChange: () => {}, }, } diff --git a/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanism.tsx b/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanism.tsx index baaadc68..eeae39cd 100644 --- a/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanism.tsx +++ b/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanism.tsx @@ -4,13 +4,13 @@ import RecoveryMechanismCard from './RecoveryMechanismCard' import { BOTH_KEY_AND_RECOVERY, KEY_FILES, RECOVERY_PHRASE } from '../../../constants' type RecoveryMechanismProps = { - selectedRecoveryMechanism: string - handleRecoveryMechanismChange: (value: string) => void + recoveryMechanism: string + handleRecMechanismChange: (value: string) => void } const RecoveryMechanism = ({ - selectedRecoveryMechanism, - handleRecoveryMechanismChange, + recoveryMechanism, + handleRecMechanismChange, }: RecoveryMechanismProps) => { return ( @@ -20,18 +20,18 @@ const RecoveryMechanism = ({ diff --git a/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanismCard.stories.ts b/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanismCard.stories.ts index 8f3192b0..912b5fb1 100644 --- a/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanismCard.stories.ts +++ b/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanismCard.stories.ts @@ -19,7 +19,7 @@ type Story = StoryObj export const Page: Story = { args: { value: KEY_FILES, - selectedRecoveryMechanism: KEY_FILES, - handleRecoveryMechanismChange: () => {}, + recoveryMechanism: KEY_FILES, + handleRecMechanismChange: () => {}, }, } diff --git a/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanismCard.tsx b/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanismCard.tsx index df689616..4b5098bd 100644 --- a/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanismCard.tsx +++ b/src/pages/ValidatorOnboarding/KeyGeneration/RecoveryMechanismCard.tsx @@ -2,27 +2,27 @@ import { Text } from '@status-im/components' type RecoveryMechanismProps = { value: string - selectedRecoveryMechanism: string - handleRecoveryMechanismChange: (value: string) => void + recoveryMechanism: string + handleRecMechanismChange: (value: string) => void } const RecoveryMechanismCard = ({ value, - selectedRecoveryMechanism, - handleRecoveryMechanismChange, + recoveryMechanism, + handleRecMechanismChange, }: RecoveryMechanismProps) => { return (
handleRecoveryMechanismChange(value)} + onClick={() => handleRecMechanismChange(value)} > {value}