diff --git a/src/cljs/status_dapp/components.cljs b/src/cljs/status_dapp/components.cljs index 9c1cf81..93952eb 100644 --- a/src/cljs/status_dapp/components.cljs +++ b/src/cljs/status_dapp/components.cljs @@ -27,7 +27,7 @@ [tab-button "ETH" :eth tab-view] [tab-button "Version" :version tab-view] [tab-button "Status API" :api tab-view] - (when js/ethereumBeta + (when (exists? js/ethereumBeta) [tab-button "Beta Provider" :beta tab-view]) [tab-button "About" :about tab-view]] [react/view {:style {:height 1 :margin-top 10 :background-color "#4360df33"}}]]) diff --git a/src/cljs/status_dapp/db.cljs b/src/cljs/status_dapp/db.cljs index e38c721..d2442e0 100644 --- a/src/cljs/status_dapp/db.cljs +++ b/src/cljs/status_dapp/db.cljs @@ -2,14 +2,14 @@ (:require [re-frame.core :as re-frame])) (def web3 (or (when (exists? js/web3) js/web3) - (when js/ethereumBeta + (when (exists? js/ethereumBeta) (js/setTimeout (fn [] (.then (.send js/ethereumBeta "eth_requestAccounts") #(re-frame/dispatch [:set-default-account])) (when js/ethereumBeta (.then (.getContactCode js/ethereumBeta.status) #(re-frame/dispatch [:on-status-api :contact %])))) 100) (js/Web3. js/ethereumBeta)) - (when js/ethereum + (when (exists? js/ethereum) (js/setTimeout (fn [] (.then (.enable js/ethereum) #(re-frame/dispatch [:set-default-account])) (when js/ethereum.status diff --git a/src/cljs/status_dapp/events.cljs b/src/cljs/status_dapp/events.cljs index f3a42d9..ead9eb6 100644 --- a/src/cljs/status_dapp/events.cljs +++ b/src/cljs/status_dapp/events.cljs @@ -110,7 +110,7 @@ (fn [{{:keys [web3] :as db} :db} _] (println "WEB3" web3) (when web3 - {:db (if js/window.ethereumBeta + {:db (if (exists? js/window.ethereumBeta) db (update db :web3-async-data assoc