Skip to content

Commit

Permalink
Add 'Auto Enter' button to enter the recovery phrase at once
Browse files Browse the repository at this point in the history
  • Loading branch information
neuodev committed Mar 16, 2023
1 parent 074a5a4 commit a8becb8
Showing 1 changed file with 15 additions and 1 deletion.
Expand Up @@ -3,12 +3,13 @@ import { Node, ComponentType, useState } from 'react';
import { defineMessages, injectIntl, FormattedHTMLMessage } from 'react-intl';
import { observer } from 'mobx-react';
import type { $npm$ReactIntl$IntlShape } from 'react-intl';
import { Stack, Box, Typography } from '@mui/material'
import { Stack, Box, Typography, Button } from '@mui/material'
import StepController from './StepController';
import { CREATE_WALLET_SETPS } from './steps';
import styles from './VerifyRecoveryPhraseStep.scss';
import classnames from 'classnames';
import { ReactComponent as VerifiedIcon } from '../../../assets/images/verify-icon-green.inline.svg'
import environment from '../../../environment';

const messages: * = defineMessages({
description: {
Expand All @@ -33,6 +34,7 @@ type Props = {|
currentStep: string,
|};


function VerifyRecoveryPhraseStep(props: Props & Intl): Node {
const { intl, recoveryPhrase, setCurrentStep } = props;
if (!recoveryPhrase) throw new Error('Missing recovery phrase, should never happen');
Expand Down Expand Up @@ -196,12 +198,24 @@ function VerifyRecoveryPhraseStep(props: Props & Intl): Node {
</Stack>
)}


<Box mt='10px'>
<StepController
goNext={goNextStepCallback()}
goBack={() => setCurrentStep(CREATE_WALLET_SETPS.SAVE_RECOVERY_PHRASE)}
/>
</Box>

{environment.isDev() && (
<Button
onClick={() => setRecoveryPhrase(recoveryPhrase)}
onDoubleClick={() => setRecoveryPhrase(
new Array(recoveryPhrase.length).fill(null),
)}
>
Auto Enter
</Button>
)}
</Stack>
</Stack>
);
Expand Down

0 comments on commit a8becb8

Please sign in to comment.