A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
ciphermask/ui/app/components/modals/confirm-reset-account/confirm-reset-account.compo...

38 lines
884 B

import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import Modal, { ModalContent } from '../../modal'
export default class ConfirmResetAccount extends PureComponent {
static propTypes = {
hideModal: PropTypes.func.isRequired,
resetAccount: PropTypes.func.isRequired,
}
static contextTypes = {
t: PropTypes.func,
}
handleReset = () => {
this.props.resetAccount()
.then(() => this.props.hideModal())
}
render () {
const { t } = this.context
return (
<Modal
onSubmit={this.handleReset}
onCancel={() => this.props.hideModal()}
submitText={t('reset')}
cancelText={t('nevermind')}
submitType="secondary"
>
<ModalContent
title={`${t('resetAccount')}?`}
description={t('resetAccountDescription')}
/>
</Modal>
)
}
}