mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-01-22 09:19:28 +00:00
feat: clear parent component
This commit is contained in:
parent
b89e4641a3
commit
0cb1ad783d
@ -1,10 +1,10 @@
|
|||||||
import { YStack } from 'tamagui'
|
import { YStack } from 'tamagui'
|
||||||
import KeyGenerationHeader from './KeyGenerationHeader'
|
import KeyGenerationHeader from './KeyGenerationHeader'
|
||||||
import RecoveryMechanism from './RecoveryMechanism'
|
import RecoveryMechanism from './RecoveryMechanism'
|
||||||
import { Button, InformationBox, Text } from '@status-im/components'
|
import { Text } from '@status-im/components'
|
||||||
import { CloseCircleIcon } from '@status-im/icons'
|
|
||||||
import PasswordFields from './PasswordFields'
|
import PasswordFields from './PasswordFields'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
|
import RecoveryPhrase from './RecoveryPhrase'
|
||||||
|
|
||||||
const KeyGeneration = () => {
|
const KeyGeneration = () => {
|
||||||
const [selectedRecoveryMechanism, setSelectedRecoveryMechanism] = useState('Key Files')
|
const [selectedRecoveryMechanism, setSelectedRecoveryMechanism] = useState('Key Files')
|
||||||
@ -23,26 +23,8 @@ const KeyGeneration = () => {
|
|||||||
<Text size={27} weight={'semibold'}>
|
<Text size={27} weight={'semibold'}>
|
||||||
4 Validators
|
4 Validators
|
||||||
</Text>
|
</Text>
|
||||||
{selectedRecoveryMechanism === 'Key Files' && (
|
{selectedRecoveryMechanism === 'Key Files' && <PasswordFields />}
|
||||||
<>
|
{selectedRecoveryMechanism === 'Recovery Phrase' && <RecoveryPhrase />}
|
||||||
<PasswordFields />
|
|
||||||
<InformationBox
|
|
||||||
message="You should see that you have one keystore per validator. This keystore contains your signing key, encrypted with your password. Warning: Do not store keys on multiple (backup) validator clients at once"
|
|
||||||
variant="error"
|
|
||||||
icon={<CloseCircleIcon size={20} />}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{selectedRecoveryMechanism === 'Recovery Phrase' && (
|
|
||||||
<>
|
|
||||||
<Button>Reveal Recovery Phrase</Button>
|
|
||||||
<InformationBox
|
|
||||||
message="Write down and keep your Secret Recovery Phrase in a secure place. Make sure no one is looking at your screen."
|
|
||||||
variant="error"
|
|
||||||
icon={<CloseCircleIcon size={20} />}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</YStack>
|
</YStack>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { XStack, YStack } from 'tamagui'
|
import { XStack, YStack } from 'tamagui'
|
||||||
import { Button, Input, Text } from '@status-im/components'
|
import { Button, InformationBox, Input, Text } from '@status-im/components'
|
||||||
import { ClearIcon } from '@status-im/icons'
|
import { ClearIcon, CloseCircleIcon } from '@status-im/icons'
|
||||||
|
import { useState } from 'react'
|
||||||
|
|
||||||
import BorderBox from '../../../components/General/BorderBox'
|
import BorderBox from '../../../components/General/BorderBox'
|
||||||
import { useState } from 'react'
|
|
||||||
|
|
||||||
const PasswordFields = () => {
|
const PasswordFields = () => {
|
||||||
const [encryptedPassword, setEncryptedPassword] = useState('')
|
const [encryptedPassword, setEncryptedPassword] = useState('')
|
||||||
@ -75,6 +75,11 @@ const PasswordFields = () => {
|
|||||||
</BorderBox>
|
</BorderBox>
|
||||||
</XStack>
|
</XStack>
|
||||||
<Button onPress={generateKeyFilesHandler}>Generate Key files</Button>
|
<Button onPress={generateKeyFilesHandler}>Generate Key files</Button>
|
||||||
|
<InformationBox
|
||||||
|
message="You should see that you have one keystore per validator. This keystore contains your signing key, encrypted with your password. Warning: Do not store keys on multiple (backup) validator clients at once"
|
||||||
|
variant="error"
|
||||||
|
icon={<CloseCircleIcon size={20} />}
|
||||||
|
/>
|
||||||
</YStack>
|
</YStack>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user