Skip to content

Commit

Permalink
fix(suite): check seed backup on T1B1 with seed
Browse files Browse the repository at this point in the history
(cherry picked from commit b102b14)
  • Loading branch information
Lemonexe authored and komret committed Nov 25, 2024
1 parent 71f9b21 commit 112c22f
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions packages/suite/src/views/recovery/steps/T1B1InputStep.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import { Paragraph } from '@trezor/components';
import { HELP_CENTER_ADVANCED_RECOVERY_URL } from '@trezor/urls';
import { UI } from '@trezor/connect';

import { Translation, TrezorLink, WordInput, WordInputAdvanced } from 'src/components/suite';
import { useSelector } from 'src/hooks/suite';
import {
PinMatrix,
Translation,
TrezorLink,
WordInput,
WordInputAdvanced,
} from 'src/components/suite';
import { useDevice, useSelector } from 'src/hooks/suite';
import { MODAL } from 'src/actions/suite/constants';

const RequestConfirmationStep = () => (
Expand Down Expand Up @@ -33,12 +40,31 @@ const WordStep = () => (
</>
);

const EnterPinStep = () => {
const { device } = useDevice();
if (!device) return null;

return (
<>
<Translation id="TR_ENTER_PIN" />
<PinMatrix
device={device}
hideExplanation
// not relevant to entering pin, only for setting/changing pin
invalid={false}
/>
</>
);
};

export const T1B1InputStep = () => {
const modal = useSelector(state => state.modal);

if (modal.context !== MODAL.CONTEXT_DEVICE) return null;

switch (modal.windowType) {
case UI.REQUEST_PIN:
return <EnterPinStep />;
case 'ButtonRequest_Other':
return <RequestConfirmationStep />;
case 'WordRequestType_Plain':
Expand Down

0 comments on commit 112c22f

Please sign in to comment.