// @flow import React from 'react'; import { Form } from 'component/common/form'; import { Modal } from 'modal/modal'; import Button from 'component/button'; type Props = { closeModal: () => void, decryptWallet: () => void, walletDecryptSucceded: boolean, updateWalletStatus: boolean, }; class ModalWalletDecrypt extends React.PureComponent { state = { submitted: false, // Prior actions could be marked complete }; componentDidUpdate() { const { props, state } = this; if (state.submitted && props.walletDecryptSucceded === true) { props.closeModal(); props.updateWalletStatus(); } } submitDecryptForm() { this.setState({ submitted: true }); this.props.decryptWallet(); } render() { const { closeModal } = this.props; return ( this.submitDecryptForm()} onAborted={closeModal} >
this.submitDecryptForm()}>

{__( 'Your wallet has been encrypted with a local password, performing this action will remove this password.' )}

); } } export default ModalWalletDecrypt;