From 25d7c55865de57e322548a7ba4d66daf9c000c32 Mon Sep 17 00:00:00 2001 From: Rob Culliton Date: Tue, 15 May 2018 22:45:49 -0400 Subject: [PATCH] change definition for paid bounties to receipt from hash in rest of bounty files --- src/clj/commiteth/bounties.clj | 4 ++-- src/cljs/commiteth/subscriptions.cljs | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/clj/commiteth/bounties.clj b/src/clj/commiteth/bounties.clj index 2473a2e..2898adc 100644 --- a/src/clj/commiteth/bounties.clj +++ b/src/clj/commiteth/bounties.clj @@ -125,9 +125,9 @@ (let [open-claims (fn open-claims [bounty] (filter bnt/open? (:claims bounty)))] (if-let [merged-or-paid? (or (:winner_login bounty) - (:payout_hash bounty))] + (:payout_receipt bounty))] (cond - (:payout_hash bounty) :paid + (:payout_receipt bounty) :paid (nil? (:payout_address bounty)) :pending-contributor-address ;; `confirm_hash` is set by us as soon as a PR is merged and the ;; contributor address is known. Usually end users should not need diff --git a/src/cljs/commiteth/subscriptions.cljs b/src/cljs/commiteth/subscriptions.cljs index 9c840e5..2047f23 100644 --- a/src/cljs/commiteth/subscriptions.cljs +++ b/src/cljs/commiteth/subscriptions.cljs @@ -87,7 +87,10 @@ ;; special prefix or namespace for derived properties that ;; are added to domain records like this ;; e.g. `derived/paid?` - [id (assoc bounty :paid? (boolean (:payout_receipt bounty)))]) + [id (assoc bounty :paid? (boolean (and (:payout_receipt bounty) + ;; bounties with winner logins + ;; were not revoked + (:winner_login bounty))))]) (into {})))) (reg-sub