Signed-off-by: Goran Jovic <goranjovic@gmail.com>
This commit is contained in:
Andrey Shovkoplyas 2018-11-07 10:39:36 +01:00 committed by Goran Jovic
parent a3b2bc1b87
commit 36ef541037
No known key found for this signature in database
GPG Key ID: D429D1A9B2EB8A8E
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -1,4 +1,4 @@
;; Browser (webview) configuration
;; :inject-js is a map of {<domain> <js-code>}, 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; }"}}