mirror of
https://github.com/status-im/open-bounty.git
synced 2025-02-23 06:38:09 +00:00
Improve naming
This commit is contained in:
parent
882660ad0c
commit
b4f3d9e5c2
@ -221,7 +221,7 @@ AND i.transaction_hash IS NULL
|
||||
AND i.contract_address IS NULL;
|
||||
|
||||
|
||||
-- :name pending-bounties-list :? :*
|
||||
-- :name pending-bounties :? :*
|
||||
-- :doc lists all recently closed issues awaiting to be signed
|
||||
SELECT
|
||||
i.contract_address AS contract_address,
|
||||
@ -234,7 +234,7 @@ AND p.repo_id = i.repo_id
|
||||
AND u.id = p.user_id
|
||||
AND i.execute_hash IS NULL;
|
||||
|
||||
-- :name pending-payouts-list :? :*
|
||||
-- :name pending-payouts :? :*
|
||||
-- :doc lists all recently closed issues awaiting to be confirmed
|
||||
SELECT
|
||||
i.contract_address AS contract_address,
|
||||
@ -249,7 +249,7 @@ AND u.id = p.user_id
|
||||
AND i.confirm_hash IS NULL
|
||||
AND i.execute_hash IS NOT NULL;
|
||||
|
||||
-- :name confirmed-payouts-list :? :*
|
||||
-- :name confirmed-payouts :? :*
|
||||
-- :doc lists all recently confirmed bounty payouts
|
||||
SELECT
|
||||
i.contract_address AS contract_address,
|
||||
|
@ -25,20 +25,20 @@
|
||||
(jdbc/with-db-connection [con-db *db*]
|
||||
(db/bounty-claims con-db {:issue_id issue-id})))
|
||||
|
||||
(defn pending-bounties-list
|
||||
(defn pending-bounties
|
||||
[]
|
||||
(jdbc/with-db-connection [con-db *db*]
|
||||
(db/pending-bounties-list con-db)))
|
||||
(db/pending-bounties con-db)))
|
||||
|
||||
(defn pending-payouts-list
|
||||
(defn pending-payouts
|
||||
[]
|
||||
(jdbc/with-db-connection [con-db *db*]
|
||||
(db/pending-payouts-list con-db)))
|
||||
(db/pending-payouts con-db)))
|
||||
|
||||
(defn confirmed-payouts-list
|
||||
(defn confirmed-payouts
|
||||
[]
|
||||
(jdbc/with-db-connection [con-db *db*]
|
||||
(db/confirmed-payouts-list con-db)))
|
||||
(db/confirmed-payouts con-db)))
|
||||
|
||||
(defn update-confirm-hash
|
||||
[issue-id confirm-hash]
|
||||
|
@ -62,7 +62,7 @@
|
||||
[]
|
||||
(doseq [{contract-address :contract_address
|
||||
issue-id :issue_id
|
||||
payout-address :payout_address} (db-bounties/pending-bounties-list)
|
||||
payout-address :payout_address} (db-bounties/pending-bounties)
|
||||
:let [value (eth/get-balance-hex contract-address)]]
|
||||
(if (empty? payout-address)
|
||||
(log/error "Cannot sign pending bounty - winner has no payout address")
|
||||
@ -74,7 +74,7 @@
|
||||
"Gets transaction receipt for each pending payout and updates confirm_hash"
|
||||
[]
|
||||
(doseq [{issue-id :issue_id
|
||||
execute-hash :execute_hash} (db-bounties/pending-payouts-list)]
|
||||
execute-hash :execute_hash} (db-bounties/pending-payouts)]
|
||||
(log/debug "pending payout:" execute-hash)
|
||||
(when-let [receipt (eth/get-transaction-receipt execute-hash)]
|
||||
(log/info "execution receipt for issue #" issue-id ": " receipt)
|
||||
@ -85,11 +85,18 @@
|
||||
"Gets transaction receipt for each confirmed payout and updates payout_hash"
|
||||
[]
|
||||
(doseq [{issue-id :issue_id
|
||||
payout-hash :payout_hash} (db-bounties/confirmed-payouts-list)]
|
||||
payout-hash :payout_hash} (db-bounties/confirmed-payouts)]
|
||||
(log/debug "confirmed payout:" payout-hash)
|
||||
(when-let [receipt (eth/get-transaction-receipt payout-hash)]
|
||||
(log/info "payout receipt for issue #" issue-id ": " receipt)
|
||||
(db-bounties/update-payout-receipt issue-id receipt))))
|
||||
(db-bounties/update-payout-receipt issue-id receipt)
|
||||
(github/update-comment owner
|
||||
repo
|
||||
comment-id
|
||||
issue-number
|
||||
contract-address
|
||||
balance
|
||||
balance-str))))
|
||||
|
||||
|
||||
(defn abs
|
||||
|
Loading…
x
Reference in New Issue
Block a user