diff options
author | bitpshr <mail@bitpshr.net> | 2018-11-05 22:03:30 +0800 |
---|---|---|
committer | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2018-11-06 07:07:09 +0800 |
commit | 879997af517b36cf701ec74c08ec4293a2206baa (patch) | |
tree | fdbea02d5c263dd7b3096a1aec35e4f0cdf0b968 /app/scripts/controllers | |
parent | 26ada8a828ab684c310080a18115a8ef3234aaee (diff) | |
download | tangerine-wallet-browser-879997af517b36cf701ec74c08ec4293a2206baa.tar tangerine-wallet-browser-879997af517b36cf701ec74c08ec4293a2206baa.tar.gz tangerine-wallet-browser-879997af517b36cf701ec74c08ec4293a2206baa.tar.bz2 tangerine-wallet-browser-879997af517b36cf701ec74c08ec4293a2206baa.tar.lz tangerine-wallet-browser-879997af517b36cf701ec74c08ec4293a2206baa.tar.xz tangerine-wallet-browser-879997af517b36cf701ec74c08ec4293a2206baa.tar.zst tangerine-wallet-browser-879997af517b36cf701ec74c08ec4293a2206baa.zip |
Add experimental RPC method support
Diffstat (limited to 'app/scripts/controllers')
-rw-r--r-- | app/scripts/controllers/provider-approval.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/scripts/controllers/provider-approval.js b/app/scripts/controllers/provider-approval.js index f2d40e67d..f17220cb9 100644 --- a/app/scripts/controllers/provider-approval.js +++ b/app/scripts/controllers/provider-approval.js @@ -25,10 +25,10 @@ class ProviderApprovalController { this.store = new ObservableStore() if (platform && platform.addMessageListener) { - platform.addMessageListener(({ action = '', origin, siteTitle, siteImage }) => { + platform.addMessageListener(({ action = '', force, origin, siteTitle, siteImage }) => { switch (action) { case 'init-provider-request': - this._handleProviderRequest(origin, siteTitle, siteImage) + this._handleProviderRequest(origin, siteTitle, siteImage, force) break case 'init-is-approved': this._handleIsApproved(origin) @@ -51,10 +51,10 @@ class ProviderApprovalController { * @param {string} siteTitle - The title of the document requesting full provider access * @param {string} siteImage - The icon of the window requesting full provider access */ - _handleProviderRequest (origin, siteTitle, siteImage) { + _handleProviderRequest (origin, siteTitle, siteImage, force) { this.store.updateState({ providerRequests: [{ origin, siteTitle, siteImage }] }) const isUnlocked = this.keyringController.memStore.getState().isUnlocked - if (this.isApproved(origin) && this.caching && isUnlocked) { + if (!force && this.isApproved(origin) && this.caching && isUnlocked) { this.approveProviderRequest(origin) return } |