1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/app/pages/provider-approval/provider-approval.component.js
2019-12-05 10:23:43 -10:00

37 lines
1.2 KiB
JavaScript

import PropTypes from 'prop-types'
import React, { Component } from 'react'
import ProviderPageContainer from '../../components/app/provider-page-container'
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,
};
static contextTypes = {
t: PropTypes.func,
};
render () {
const { approveProviderRequestByOrigin, providerRequest, rejectProviderRequestByOrigin } = this.props
return (
<ProviderPageContainer
approveProviderRequestByOrigin={approveProviderRequestByOrigin}
rejectProviderRequestByOrigin={rejectProviderRequestByOrigin}
origin={providerRequest.origin}
siteImage={providerRequest.siteImage}
siteTitle={providerRequest.siteTitle}
hostname={providerRequest.hostname}
extensionId={providerRequest.extensionId}
/>
)
}
}