diff options
author | Chen Wei <chenwei@byzantine-lab.io> | 2019-07-02 11:28:42 +0800 |
---|---|---|
committer | Chen Wei <chenwei@byzantine-lab.io> | 2019-07-02 11:28:42 +0800 |
commit | 4f6928b11b90151295456fbc88e592bb920c4771 (patch) | |
tree | 5b250af2b08fe06acc3e49262865fceef67a7fd4 | |
parent | 4af785859d508445228dba9c3d5163ac842b4b53 (diff) | |
download | tangerine-wallet-browser-4f6928b11b90151295456fbc88e592bb920c4771.tar tangerine-wallet-browser-4f6928b11b90151295456fbc88e592bb920c4771.tar.gz tangerine-wallet-browser-4f6928b11b90151295456fbc88e592bb920c4771.tar.bz2 tangerine-wallet-browser-4f6928b11b90151295456fbc88e592bb920c4771.tar.lz tangerine-wallet-browser-4f6928b11b90151295456fbc88e592bb920c4771.tar.xz tangerine-wallet-browser-4f6928b11b90151295456fbc88e592bb920c4771.tar.zst tangerine-wallet-browser-4f6928b11b90151295456fbc88e592bb920c4771.zip |
dapp handler injected as "tangerine"
-rw-r--r-- | app/scripts/contentscript.js | 4 | ||||
-rw-r--r-- | app/scripts/inpage.js | 3 | ||||
-rw-r--r-- | app/scripts/lib/auto-reload.js | 3 | ||||
-rw-r--r-- | ui/app/components/app/loading-network-screen/loading-network-screen.component.js | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index 0c55ae39f..9268eef99 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -69,9 +69,9 @@ async function setupStreams () { // create and connect channel muxers // so we can handle the channels individually const pageMux = new ObjectMultiplex() - pageMux.setMaxListeners(25) + pageMux.setMaxListeners(100) const extensionMux = new ObjectMultiplex() - extensionMux.setMaxListeners(25) + extensionMux.setMaxListeners(100) pump( pageMux, diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js index fb16dd43d..4ab361469 100644 --- a/app/scripts/inpage.js +++ b/app/scripts/inpage.js @@ -108,7 +108,8 @@ const proxiedInpageProvider = new Proxy(inpageProvider, { deleteProperty: () => true, }) -window.ethereum = createStandardProvider(proxiedInpageProvider) +// window.ethereum = createStandardProvider(proxiedInpageProvider) +window.tangerine = createStandardProvider(proxiedInpageProvider) // // setup web3 diff --git a/app/scripts/lib/auto-reload.js b/app/scripts/lib/auto-reload.js index 44fbe847c..667176dd7 100644 --- a/app/scripts/lib/auto-reload.js +++ b/app/scripts/lib/auto-reload.js @@ -22,7 +22,8 @@ function setupDappAutoReload (web3, observable) { observable.subscribe(function (state) { // if the auto refresh on network change is false do not // do anything - if (!window.ethereum.autoRefreshOnNetworkChange) return + // if (!window.ethereum.autoRefreshOnNetworkChange) return + if (!window.tangerine.autoRefreshOnNetworkChange) return // if reload in progress, no need to check reload logic if (reloadInProgress) return diff --git a/ui/app/components/app/loading-network-screen/loading-network-screen.component.js b/ui/app/components/app/loading-network-screen/loading-network-screen.component.js index 97b16d08f..b8ff25932 100644 --- a/ui/app/components/app/loading-network-screen/loading-network-screen.component.js +++ b/ui/app/components/app/loading-network-screen/loading-network-screen.component.js @@ -128,7 +128,7 @@ export default class LoadingNetworkScreen extends PureComponent { <div className="loading-overlay"> <div className="page-container__header-close" - onClick={() => setProviderType(lastSelectedProvider || 'ropsten')} + onClick={() => setProviderType(lastSelectedProvider || 'tangerine_testnet')} /> <div className="loading-overlay__container"> { this.state.showErrorScreen |