aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorPaul Bouchon <mail@bitpshr.net>2019-01-31 02:27:33 +0800
committerDan Finlay <542863+danfinlay@users.noreply.github.com>2019-01-31 02:27:33 +0800
commitdb776b5a02187d4545e3fb2b9dfd33d838145af7 (patch)
treec657d478d32005b80c8e6aa5e7ec45b075e8e954 /ui
parentb2813d1113b75df09e9bb9f0781f65a2544adcfb (diff)
downloadtangerine-wallet-browser-db776b5a02187d4545e3fb2b9dfd33d838145af7.tar
tangerine-wallet-browser-db776b5a02187d4545e3fb2b9dfd33d838145af7.tar.gz
tangerine-wallet-browser-db776b5a02187d4545e3fb2b9dfd33d838145af7.tar.bz2
tangerine-wallet-browser-db776b5a02187d4545e3fb2b9dfd33d838145af7.tar.lz
tangerine-wallet-browser-db776b5a02187d4545e3fb2b9dfd33d838145af7.tar.xz
tangerine-wallet-browser-db776b5a02187d4545e3fb2b9dfd33d838145af7.tar.zst
tangerine-wallet-browser-db776b5a02187d4545e3fb2b9dfd33d838145af7.zip
EIP-1102 updates (#6006)
* Update privacy notice * Respond to 1102 messages using tab ID
Diffstat (limited to 'ui')
-rw-r--r--ui/app/actions.js8
-rw-r--r--ui/app/components/pages/provider-approval/provider-approval.component.js1
-rw-r--r--ui/app/components/pages/provider-approval/provider-approval.container.js4
-rw-r--r--ui/app/components/provider-page-container/provider-page-container.component.js9
4 files changed, 12 insertions, 10 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 2b073e915..c4212f35b 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -2625,15 +2625,15 @@ function setPendingTokens (pendingTokens) {
}
}
-function approveProviderRequest (origin) {
+function approveProviderRequest (tabID) {
return (dispatch) => {
- background.approveProviderRequest(origin)
+ background.approveProviderRequest(tabID)
}
}
-function rejectProviderRequest (origin) {
+function rejectProviderRequest (tabID) {
return (dispatch) => {
- background.rejectProviderRequest(origin)
+ background.rejectProviderRequest(tabID)
}
}
diff --git a/ui/app/components/pages/provider-approval/provider-approval.component.js b/ui/app/components/pages/provider-approval/provider-approval.component.js
index da98bc3fc..11895327a 100644
--- a/ui/app/components/pages/provider-approval/provider-approval.component.js
+++ b/ui/app/components/pages/provider-approval/provider-approval.component.js
@@ -19,6 +19,7 @@ export default class ProviderApproval extends Component {
<ProviderPageContainer
approveProviderRequest={approveProviderRequest}
origin={providerRequest.origin}
+ tabID={providerRequest.tabID}
rejectProviderRequest={rejectProviderRequest}
siteImage={providerRequest.siteImage}
siteTitle={providerRequest.siteTitle}
diff --git a/ui/app/components/pages/provider-approval/provider-approval.container.js b/ui/app/components/pages/provider-approval/provider-approval.container.js
index b223244a1..28e4531a9 100644
--- a/ui/app/components/pages/provider-approval/provider-approval.container.js
+++ b/ui/app/components/pages/provider-approval/provider-approval.container.js
@@ -4,8 +4,8 @@ import { approveProviderRequest, rejectProviderRequest } from '../../../actions'
function mapDispatchToProps (dispatch) {
return {
- approveProviderRequest: origin => dispatch(approveProviderRequest(origin)),
- rejectProviderRequest: origin => dispatch(rejectProviderRequest(origin)),
+ approveProviderRequest: tabID => dispatch(approveProviderRequest(tabID)),
+ rejectProviderRequest: tabID => dispatch(rejectProviderRequest(tabID)),
}
}
diff --git a/ui/app/components/provider-page-container/provider-page-container.component.js b/ui/app/components/provider-page-container/provider-page-container.component.js
index 902733616..30b6b02fc 100644
--- a/ui/app/components/provider-page-container/provider-page-container.component.js
+++ b/ui/app/components/provider-page-container/provider-page-container.component.js
@@ -10,6 +10,7 @@ export default class ProviderPageContainer extends PureComponent {
rejectProviderRequest: PropTypes.func.isRequired,
siteImage: PropTypes.string,
siteTitle: PropTypes.string.isRequired,
+ tabID: PropTypes.string.isRequired,
};
static contextTypes = {
@@ -17,13 +18,13 @@ export default class ProviderPageContainer extends PureComponent {
};
onCancel = () => {
- const { origin, rejectProviderRequest } = this.props
- rejectProviderRequest(origin)
+ const { tabID, rejectProviderRequest } = this.props
+ rejectProviderRequest(tabID)
}
onSubmit = () => {
- const { approveProviderRequest, origin } = this.props
- approveProviderRequest(origin)
+ const { approveProviderRequest, tabID } = this.props
+ approveProviderRequest(tabID)
}
render () {