diff --git a/src/clj/commiteth/scheduler.clj b/src/clj/commiteth/scheduler.clj index 1e39b91..0d9aeb5 100644 --- a/src/clj/commiteth/scheduler.clj +++ b/src/clj/commiteth/scheduler.clj @@ -50,9 +50,11 @@ issue-id :issue_id payout-address :payout_address} (db-bounties/pending-bounties-list) :let [value (eth/get-balance-hex contract-address)]] - (->> - (wallet/execute contract-address payout-address value) - (db-bounties/update-execute-hash issue-id)))) + (if (empty? payout-address) + (log/error "Cannot sign pending bounty - winner has no payout address") + (->> + (wallet/execute contract-address payout-address value) + (db-bounties/update-execute-hash issue-id))))) (defn update-confirm-hash "Gets transaction receipt for each pending payout and updates confirm_hash"