diff --git a/src/status_im/ui/screens/browser/views.cljs b/src/status_im/ui/screens/browser/views.cljs index eb3e4f8a50..559ee7f55a 100644 --- a/src/status_im/ui/screens/browser/views.cljs +++ b/src/status_im/ui/screens/browser/views.cljs @@ -135,13 +135,13 @@ :on-load #(re-frame/dispatch [:browser/loading-started]) :on-error #(re-frame/dispatch [:browser/error-occured]) :injected-on-start-loading-java-script (str (not opt-in?) js-res/web3 - (get-inject-js url) (if opt-in? (js-res/web3-opt-in-init (str network-id)) (js-res/web3-init rpc-url (ethereum/normalized-address address) - (str network-id)))) + (str network-id))) + (get-inject-js url)) :injected-java-script js-res/webview-js}]) (when (or loading? resolving?) [react/view styles/web-view-loading diff --git a/src/status_im/utils/browser_config.edn b/src/status_im/utils/browser_config.edn index 23b21a7e34..9f1264103a 100644 --- a/src/status_im/utils/browser_config.edn +++ b/src/status_im/utils/browser_config.edn @@ -1,4 +1,4 @@ ;; Browser (webview) configuration ;; :inject-js is a map of { }, JS code will be injected if the domain name matches (www. is stripped away) -{:inject-js {"cryptokitties.co" "; if (!window.chrome) { window.chrome = { webstore: true }; }"}} +{:inject-js {"cryptokitties.co" "; if (!window.chrome) { window.chrome = { webstore: true }; window.ethereum.isMetaMask = web3.currentProvider.isMetaMask = true; }"}}