allow payout_hash to imply merge when calculating bounty-state

This commit is contained in:
Martin Klepsch 2018-04-05 11:04:18 +02:00 committed by Tetiana Churikova
parent 936d461f3c
commit 45ec5f2b0e
1 changed files with 4 additions and 1 deletions

View File

@ -123,7 +123,10 @@
[bounty]
(assert-keys bounty [:winner_login :payout_address :confirm_hash :payout_hash
:claims :tokens :contract_address])
(if-let [merged? (:winner_login bounty)]
;; Some bounties have been paid out manually, the payout hash
;; was set properly but winner_login was not
(if-let [merged-or-paid? (or (:winner_login bounty)
(:payout_hash bounty))]
(cond
(nil? (:payout_address bounty)) :pending-contributor-address
(nil? (:confirm_hash bounty)) :pending-maintainer-confirmation