1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-16 05:19:12 +00:00

display NoBackup modal

This commit is contained in:
Szymon Lesisz 2019-02-22 17:40:58 +01:00
parent e336a4f05f
commit 3ac1b20747

View File

@ -19,6 +19,7 @@ import PassphraseType from 'components/modals/passphrase/Type';
import ConfirmSignTx from 'components/modals/confirm/SignTx';
import ConfirmAction from 'components/modals/confirm/Action';
import ConfirmUnverifiedAddress from 'components/modals/confirm/UnverifiedAddress';
import ConfirmNoBackup from 'components/modals/confirm/NoBackup';
import ForgetDevice from 'components/modals/device/Forget';
import RememberDevice from 'components/modals/device/Remember';
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
const Modal = (props: Props) => {
const { modal } = props;
@ -205,6 +219,9 @@ const Modal = (props: Props) => {
case MODAL.CONTEXT_SCAN_QR:
component = getQrModal(props);
break;
case MODAL.CONTEXT_CONFIRMATION:
component = getConfirmationModal(props);
break;
default:
break;
}