mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-30 16:18:07 +01:00
1ecf241a9f
* Rename reset account settings Fix snapshot Update snapshots Fix e2e tests Fix e2e tests * Rename reset-account e2e test to clear-activity e2e test
38 lines
892 B
JavaScript
38 lines
892 B
JavaScript
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('clear')}
|
|
cancelText={t('nevermind')}
|
|
submitType="danger-primary"
|
|
>
|
|
<ModalContent
|
|
title={`${t('clearActivity')}?`}
|
|
description={t('clearActivityDescription')}
|
|
/>
|
|
</Modal>
|
|
);
|
|
}
|
|
}
|