From 662ab33d9fbfda8e3550c0d0644f87784d7c0131 Mon Sep 17 00:00:00 2001 From: Rob Culliton Date: Thu, 24 May 2018 21:53:37 -0400 Subject: [PATCH] incude confirmed? check, and make sure that flag is updated after confirming? so blue button doesn't stick around --- src/cljs/commiteth/handlers.cljs | 4 +-- src/cljs/commiteth/manage_payouts.cljs | 36 ++++++++++++++------------ 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/cljs/commiteth/handlers.cljs b/src/cljs/commiteth/handlers.cljs index 3ae71a1..653c215 100644 --- a/src/cljs/commiteth/handlers.cljs +++ b/src/cljs/commiteth/handlers.cljs @@ -527,8 +527,8 @@ (fn [{:keys [db]} [_ issue-id]] {:dispatch [:load-owner-bounties] :db (-> db - (dissoc-in [:owner-bounties issue-id :confirming?]) - (assoc-in [:owner-bounties issue-id :confirmed?] true)) + (assoc-in [:owner-bounties issue-id :confirmed?] true) + (dissoc-in [:owner-bounties issue-id :confirming?])) :store (dissoc-in store [:owner-bounties issue-id :confirming?])})) (reg-event-fx diff --git a/src/cljs/commiteth/manage_payouts.cljs b/src/cljs/commiteth/manage_payouts.cljs index 5348c73..e4c9436 100644 --- a/src/cljs/commiteth/manage_payouts.cljs +++ b/src/cljs/commiteth/manage_payouts.cljs @@ -68,24 +68,26 @@ (defn confirm-row [bounty claim] - (let [payout-address-available? (:payout_address bounty)] - [:div - (when-not payout-address-available? - [:div.bg-sob-blue-o-20.pv2.ph3.br3.mb3.f6 - [:p [:span.pg-med (or (:user_name claim) (:user_login claim)) - "’s payment address is pending."] " You will be able to confirm the payment once the address is provided."]]) - [:div.cf - [:div.dt.fr + (let [payout-address-available? (:payout_address bounty) + confirmed? (:confirmed? bounty)] + (when-not confirmed? + [:div (when-not payout-address-available? - {:style {:-webkit-filter "grayscale(1)" - :pointer-events "none"}}) - [:div.dtc.v-mid.pr3.f6 - [:div - [ui-balances/token-balances (bnt/crypto-balances bounty) :badge] - [:div.dib.mr2.pv1 - [ui-balances/usd-value-label (:value-usd bounty)]]]] - [:div.dtc.v-mid - [confirm-button bounty claim]]]]])) + [:div.bg-sob-blue-o-20.pv2.ph3.br3.mb3.f6 + [:p [:span.pg-med (or (:user_name claim) (:user_login claim)) + "’s payment address is pending."] " You will be able to confirm the payment once the address is provided."]]) + [:div.cf + [:div.dt.fr + (when-not payout-address-available? + {:style {:-webkit-filter "grayscale(1)" + :pointer-events "none"}}) + [:div.dtc.v-mid.pr3.f6 + [:div + [ui-balances/token-balances (bnt/crypto-balances bounty) :badge] + [:div.dib.mr2.pv1 + [ui-balances/usd-value-label (:value-usd bounty)]]]] + [:div.dtc.v-mid + [confirm-button bounty claim]]]]]))) (defn view-pr-button [claim] [primary-button-link