change definition for paid bounties to receipt from hash in rest of bounty files

This commit is contained in:
Rob Culliton 2018-05-15 22:45:49 -04:00
parent 458a46ca62
commit 25d7c55865
No known key found for this signature in database
GPG Key ID: 6FDEF60B3DC84D94
2 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -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