mirror of
https://github.com/trezor/trezor-wallet
synced 2025-06-27 10:22:35 +00:00
display NoBackup modal
This commit is contained in:
parent
e336a4f05f
commit
3ac1b20747
@ -19,6 +19,7 @@ import PassphraseType from 'components/modals/passphrase/Type';
|
|||||||
import ConfirmSignTx from 'components/modals/confirm/SignTx';
|
import ConfirmSignTx from 'components/modals/confirm/SignTx';
|
||||||
import ConfirmAction from 'components/modals/confirm/Action';
|
import ConfirmAction from 'components/modals/confirm/Action';
|
||||||
import ConfirmUnverifiedAddress from 'components/modals/confirm/UnverifiedAddress';
|
import ConfirmUnverifiedAddress from 'components/modals/confirm/UnverifiedAddress';
|
||||||
|
import ConfirmNoBackup from 'components/modals/confirm/NoBackup';
|
||||||
import ForgetDevice from 'components/modals/device/Forget';
|
import ForgetDevice from 'components/modals/device/Forget';
|
||||||
import RememberDevice from 'components/modals/device/Remember';
|
import RememberDevice from 'components/modals/device/Remember';
|
||||||
import DuplicateDevice from 'components/modals/device/Duplicate';
|
import DuplicateDevice from 'components/modals/device/Duplicate';
|
||||||
@ -189,6 +190,19 @@ const getQrModal = (props: Props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getConfirmationModal = (props: Props) => {
|
||||||
|
const { modal, modalActions } = props;
|
||||||
|
|
||||||
|
if (modal.context !== MODAL.CONTEXT_CONFIRMATION) return null;
|
||||||
|
|
||||||
|
switch (modal.windowType) {
|
||||||
|
case 'no-backup':
|
||||||
|
return (<ConfirmNoBackup onReceiveConfirmation={modalActions.onReceiveConfirmation} />);
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// modal container component
|
// modal container component
|
||||||
const Modal = (props: Props) => {
|
const Modal = (props: Props) => {
|
||||||
const { modal } = props;
|
const { modal } = props;
|
||||||
@ -205,6 +219,9 @@ const Modal = (props: Props) => {
|
|||||||
case MODAL.CONTEXT_SCAN_QR:
|
case MODAL.CONTEXT_SCAN_QR:
|
||||||
component = getQrModal(props);
|
component = getQrModal(props);
|
||||||
break;
|
break;
|
||||||
|
case MODAL.CONTEXT_CONFIRMATION:
|
||||||
|
component = getConfirmationModal(props);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user