1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 11:01:41 +01:00
metamask-extension/ui/app/pages/provider-approval/provider-approval.component.js

37 lines
1.2 KiB
JavaScript
Raw Normal View History

2018-09-27 20:19:09 +02:00
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import ProviderPageContainer from '../../components/app/provider-page-container'
2018-09-27 20:19:09 +02:00
export default class ProviderApproval extends Component {
static propTypes = {
approveProviderRequestByOrigin: PropTypes.func.isRequired,
rejectProviderRequestByOrigin: PropTypes.func.isRequired,
providerRequest: PropTypes.exact({
hostname: PropTypes.string.isRequired,
siteImage: PropTypes.string,
siteTitle: PropTypes.string,
origin: PropTypes.string.isRequired,
extensionId: PropTypes.string,
}).isRequired,
2018-09-27 20:19:09 +02:00
};
static contextTypes = {
t: PropTypes.func,
};
render () {
const { approveProviderRequestByOrigin, providerRequest, rejectProviderRequestByOrigin } = this.props
2018-09-27 20:19:09 +02:00
return (
<ProviderPageContainer
approveProviderRequestByOrigin={approveProviderRequestByOrigin}
rejectProviderRequestByOrigin={rejectProviderRequestByOrigin}
origin={providerRequest.origin}
siteImage={providerRequest.siteImage}
siteTitle={providerRequest.siteTitle}
hostname={providerRequest.hostname}
extensionId={providerRequest.extensionId}
/>
2018-09-27 20:19:09 +02:00
)
}
}