From 45ec5f2b0e85a8996d6274626ade3765ff9431aa Mon Sep 17 00:00:00 2001 From: Martin Klepsch Date: Thu, 5 Apr 2018 11:04:18 +0200 Subject: [PATCH] allow payout_hash to imply merge when calculating bounty-state --- src/clj/commiteth/bounties.clj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/clj/commiteth/bounties.clj b/src/clj/commiteth/bounties.clj index a2c93c6..2803c55 100644 --- a/src/clj/commiteth/bounties.clj +++ b/src/clj/commiteth/bounties.clj @@ -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