diff options
author | kumavis <kumavis@users.noreply.github.com> | 2019-05-04 01:32:05 +0800 |
---|---|---|
committer | Frankie <frankie.diamond@gmail.com> | 2019-05-04 01:32:05 +0800 |
commit | 2845398c3d824e5da1830ba7905ffdbf8149cf9e (patch) | |
tree | a95ca83b7cf8ac42cef5ad08d29e8240f8bf1e30 /ui/app/pages | |
parent | 2ff522604b2a5f45697087613de5efb9bba58790 (diff) | |
download | tangerine-wallet-browser-2845398c3d824e5da1830ba7905ffdbf8149cf9e.tar tangerine-wallet-browser-2845398c3d824e5da1830ba7905ffdbf8149cf9e.tar.gz tangerine-wallet-browser-2845398c3d824e5da1830ba7905ffdbf8149cf9e.tar.bz2 tangerine-wallet-browser-2845398c3d824e5da1830ba7905ffdbf8149cf9e.tar.lz tangerine-wallet-browser-2845398c3d824e5da1830ba7905ffdbf8149cf9e.tar.xz tangerine-wallet-browser-2845398c3d824e5da1830ba7905ffdbf8149cf9e.tar.zst tangerine-wallet-browser-2845398c3d824e5da1830ba7905ffdbf8149cf9e.zip |
Refactor ProviderApprovalController to use rpc and publicConfigStore (#6410)
* Ensure home screen does not render if there are unapproved txs (#6501)
* Ensure that the confirm screen renders before the home screen if there are unapproved txs.
* Only render confirm screen before home screen on mount.
* inpage - revert _metamask api to isEnabled isApproved isUnlocked
Diffstat (limited to 'ui/app/pages')
-rw-r--r-- | ui/app/pages/provider-approval/provider-approval.component.js | 10 | ||||
-rw-r--r-- | ui/app/pages/provider-approval/provider-approval.container.js | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/ui/app/pages/provider-approval/provider-approval.component.js b/ui/app/pages/provider-approval/provider-approval.component.js index 1f1d68da7..70d3d0007 100644 --- a/ui/app/pages/provider-approval/provider-approval.component.js +++ b/ui/app/pages/provider-approval/provider-approval.component.js @@ -4,9 +4,9 @@ import ProviderPageContainer from '../../components/app/provider-page-container' export default class ProviderApproval extends Component { static propTypes = { - approveProviderRequest: PropTypes.func.isRequired, + approveProviderRequestByOrigin: PropTypes.func.isRequired, + rejectProviderRequestByOrigin: PropTypes.func.isRequired, providerRequest: PropTypes.object.isRequired, - rejectProviderRequest: PropTypes.func.isRequired, }; static contextTypes = { @@ -14,13 +14,13 @@ export default class ProviderApproval extends Component { }; render () { - const { approveProviderRequest, providerRequest, rejectProviderRequest } = this.props + const { approveProviderRequestByOrigin, providerRequest, rejectProviderRequestByOrigin } = this.props return ( <ProviderPageContainer - approveProviderRequest={approveProviderRequest} + approveProviderRequestByOrigin={approveProviderRequestByOrigin} + rejectProviderRequestByOrigin={rejectProviderRequestByOrigin} origin={providerRequest.origin} tabID={providerRequest.tabID} - rejectProviderRequest={rejectProviderRequest} siteImage={providerRequest.siteImage} siteTitle={providerRequest.siteTitle} /> diff --git a/ui/app/pages/provider-approval/provider-approval.container.js b/ui/app/pages/provider-approval/provider-approval.container.js index d53c0ae4d..1e167ddb7 100644 --- a/ui/app/pages/provider-approval/provider-approval.container.js +++ b/ui/app/pages/provider-approval/provider-approval.container.js @@ -1,11 +1,11 @@ import { connect } from 'react-redux' import ProviderApproval from './provider-approval.component' -import { approveProviderRequest, rejectProviderRequest } from '../../store/actions' +import { approveProviderRequestByOrigin, rejectProviderRequestByOrigin } from '../../store/actions' function mapDispatchToProps (dispatch) { return { - approveProviderRequest: tabID => dispatch(approveProviderRequest(tabID)), - rejectProviderRequest: tabID => dispatch(rejectProviderRequest(tabID)), + approveProviderRequestByOrigin: origin => dispatch(approveProviderRequestByOrigin(origin)), + rejectProviderRequestByOrigin: origin => dispatch(rejectProviderRequestByOrigin(origin)), } } |