diff options
author | Paul Bouchon <mail@bitpshr.net> | 2018-11-10 09:40:32 +0800 |
---|---|---|
committer | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2018-11-10 10:21:59 +0800 |
commit | c3176248544e3e0019389b1f177cac68087bfe8f (patch) | |
tree | c1100bb2ef2949138a48d950b206f85b06ab8948 /app/scripts/contentscript.js | |
parent | 782c2c14d4278c5228465b39408f5eafb167b86a (diff) | |
download | tangerine-wallet-browser-c3176248544e3e0019389b1f177cac68087bfe8f.tar tangerine-wallet-browser-c3176248544e3e0019389b1f177cac68087bfe8f.tar.gz tangerine-wallet-browser-c3176248544e3e0019389b1f177cac68087bfe8f.tar.bz2 tangerine-wallet-browser-c3176248544e3e0019389b1f177cac68087bfe8f.tar.lz tangerine-wallet-browser-c3176248544e3e0019389b1f177cac68087bfe8f.tar.xz tangerine-wallet-browser-c3176248544e3e0019389b1f177cac68087bfe8f.tar.zst tangerine-wallet-browser-c3176248544e3e0019389b1f177cac68087bfe8f.zip |
EIP-1102: Update publicConfig store concurrently with approval
Diffstat (limited to 'app/scripts/contentscript.js')
-rw-r--r-- | app/scripts/contentscript.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index efb14233d..ee38ee3ab 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -147,11 +147,15 @@ function listenForProviderRequest () { } }) - extension.runtime.onMessage.addListener(({ action = '', isApproved, caching, isUnlocked }) => { + extension.runtime.onMessage.addListener(({ action = '', isApproved, caching, isUnlocked, selectedAddress }) => { switch (action) { case 'approve-provider-request': isEnabled = true - window.postMessage({ type: 'ethereumprovider' }, '*') + window.postMessage({ type: 'ethereumprovider', selectedAddress }, '*') + break + case 'approve-legacy-provider-request': + isEnabled = true + window.postMessage({ type: 'ethereumproviderlegacy', selectedAddress }, '*') break case 'reject-provider-request': window.postMessage({ type: 'ethereumprovider', error: 'User rejected provider access' }, '*') |