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/clear-approved-origins/clear-approved-origins.comp...

39 lines
908 B

import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import Modal, { ModalContent } from '../../modal'
export default class ClearApprovedOrigins extends PureComponent {
static propTypes = {
hideModal: PropTypes.func.isRequired,
clearApprovedOrigins: PropTypes.func.isRequired,
}
static contextTypes = {
t: PropTypes.func,
}
handleClear = () => {
const { clearApprovedOrigins, hideModal } = this.props
clearApprovedOrigins()
hideModal()
}
render () {
const { t } = this.context
return (
<Modal
onSubmit={this.handleClear}
onCancel={() => this.props.hideModal()}
submitText={t('ok')}
cancelText={t('nevermind')}
submitType="secondary"
>
<ModalContent
title={t('clearApprovalData')}
description={t('confirmClear')}
/>
</Modal>
)
}
}