From e6e62d3adc59b0277434161cdb945d955df24507 Mon Sep 17 00:00:00 2001 From: Teemu Patja Date: Wed, 8 Mar 2017 22:35:55 +0200 Subject: [PATCH] Indicate signing bounties not possible without web3 * show a warning div informing that signing off bounties is not possible without a connected wallet (Fixes #28) --- src/cljs/commiteth/bounties.cljs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cljs/commiteth/bounties.cljs b/src/cljs/commiteth/bounties.cljs index 93a5bf6..4848e93 100644 --- a/src/cljs/commiteth/bounties.cljs +++ b/src/cljs/commiteth/bounties.cljs @@ -59,12 +59,17 @@ (defn bounties-page [] (let [owner-bounties (rf/subscribe [:owner-bounties])] (fn [] - (let [bounties (vals @owner-bounties) + (let [web3 (.-web3 js/window) + bounties (vals @owner-bounties) unpaid? #(empty? (:payout_hash %)) paid? #(not-empty (:payout_hash %)) unpaid-bounties (filter unpaid? bounties) paid-bounties (filter paid? bounties)] [:div.ui.container + (when (nil? web3) + [:div.ui.warning.message + [:i.warning.icon] + "To sign off claims, please view Commiteth in Status, Mist or Metamask"]) [:h3 "New claims"] [claim-list unpaid-bounties] [:h3 "Old claims"]