diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b57d8abd..00000000 --- a/.gitignore +++ /dev/null @@ -1,28 +0,0 @@ -/target -/lib -/classes -/checkouts -/out -/resources/public/js/compiled -/resources/public/css/style.css -pom.xml -*.jar -*.class -/*.lein-* -profiles.clj -/.env -.nrepl-port -/log -.idea -*.iml -*.ipr -*.log -*.pyc -*result.xml -.cache -.idea -resources/contracts -node_modules -/config-prod.edn -/config-dev.edn -/config-test.edn diff --git a/macchiato-app/project.clj b/macchiato-app/project.clj index 8037bd4e..1139e2d1 100644 --- a/macchiato-app/project.clj +++ b/macchiato-app/project.clj @@ -8,7 +8,7 @@ [macchiato/core "0.2.2"] [macchiato/env "0.0.6"] [mount "0.1.11"] - [cljs-web3 "0.19.0-0-7"] + [cljs-web3 "0.19.0-011"] [org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.9.908"]] :min-lein-version "2.0.0" diff --git a/project.clj b/project.clj index 16209a75..4e206a58 100644 --- a/project.clj +++ b/project.clj @@ -50,7 +50,7 @@ [akiroz.re-frame/storage "0.1.2"] [cljsjs/chartjs "2.6.0-0"] [org.web3j/core "2.3.1"] - [cljs-web3 "0.19.0-0-7"]] + [cljs-web3 "0.19.0-0-11"]] :min-lein-version "2.0.0" :source-paths ["src/clj" "src/cljc"] diff --git a/src/cljs/commiteth/common.cljs b/src/cljs/commiteth/common.cljs index 194e75e9..a11a4a85 100644 --- a/src/cljs/commiteth/common.cljs +++ b/src/cljs/commiteth/common.cljs @@ -7,8 +7,12 @@ [goog.i18n.DateTimePatterns :as DateTimePatterns]) (:import (goog.i18n DateTimeFormat))) -(defn web3 [] - (gobj/get js/window "web3")) +(defn web3 + "Return the web3 instance injected via Mist or Metamask" + [] + (new (goog.object/getValueByKeys js/window "web3" "constructor") + (current-provider + (goog.object/get js/window "web3")))) (defn input [val-ratom props] (fn []