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)
This commit is contained in:
parent
8aa7c87835
commit
e6e62d3adc
|
@ -59,12 +59,17 @@
|
||||||
(defn bounties-page []
|
(defn bounties-page []
|
||||||
(let [owner-bounties (rf/subscribe [:owner-bounties])]
|
(let [owner-bounties (rf/subscribe [:owner-bounties])]
|
||||||
(fn []
|
(fn []
|
||||||
(let [bounties (vals @owner-bounties)
|
(let [web3 (.-web3 js/window)
|
||||||
|
bounties (vals @owner-bounties)
|
||||||
unpaid? #(empty? (:payout_hash %))
|
unpaid? #(empty? (:payout_hash %))
|
||||||
paid? #(not-empty (:payout_hash %))
|
paid? #(not-empty (:payout_hash %))
|
||||||
unpaid-bounties (filter unpaid? bounties)
|
unpaid-bounties (filter unpaid? bounties)
|
||||||
paid-bounties (filter paid? bounties)]
|
paid-bounties (filter paid? bounties)]
|
||||||
[:div.ui.container
|
[: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"]
|
[:h3 "New claims"]
|
||||||
[claim-list unpaid-bounties]
|
[claim-list unpaid-bounties]
|
||||||
[:h3 "Old claims"]
|
[:h3 "Old claims"]
|
||||||
|
|
Loading…
Reference in New Issue