Handle empty payout address case gracefully
* log error instead of crashing if a bounty issue gets merged and bounty winner has no address
This commit is contained in:
parent
9262c3e3c2
commit
a8f2d1c1ab
|
@ -50,9 +50,11 @@
|
||||||
issue-id :issue_id
|
issue-id :issue_id
|
||||||
payout-address :payout_address} (db-bounties/pending-bounties-list)
|
payout-address :payout_address} (db-bounties/pending-bounties-list)
|
||||||
:let [value (eth/get-balance-hex contract-address)]]
|
:let [value (eth/get-balance-hex contract-address)]]
|
||||||
|
(if (empty? payout-address)
|
||||||
|
(log/error "Cannot sign pending bounty - winner has no payout address")
|
||||||
(->>
|
(->>
|
||||||
(wallet/execute contract-address payout-address value)
|
(wallet/execute contract-address payout-address value)
|
||||||
(db-bounties/update-execute-hash issue-id))))
|
(db-bounties/update-execute-hash issue-id)))))
|
||||||
|
|
||||||
(defn update-confirm-hash
|
(defn update-confirm-hash
|
||||||
"Gets transaction receipt for each pending payout and updates confirm_hash"
|
"Gets transaction receipt for each pending payout and updates confirm_hash"
|
||||||
|
|
Loading…
Reference in New Issue