mirror of
https://github.com/status-im/open-bounty.git
synced 2025-02-17 03:47:58 +00:00
Use stored token balance for paid GH comment instead of on-chain balance
Fixes: #151
This commit is contained in:
parent
a4fef67e08
commit
8e4e27ffbe
@ -144,11 +144,11 @@
|
||||
updated :updated} (db-bounties/confirmed-payouts)]
|
||||
(log/debug "confirmed payout:" payout-hash)
|
||||
(if-let [receipt (eth/get-transaction-receipt payout-hash)]
|
||||
(let [tokens (multisig/token-balances contract-address)
|
||||
eth-balance (eth/get-balance-wei contract-address)]
|
||||
(let [contract-tokens (multisig/token-balances contract-address)
|
||||
contract-eth-balance (eth/get-balance-wei contract-address)]
|
||||
(if (or
|
||||
(some #(> (second %) 0.0) tokens)
|
||||
(> eth-balance 0))
|
||||
(some #(> (second %) 0.0) contract-tokens)
|
||||
(> contract-eth-balance 0))
|
||||
(do
|
||||
(log/info "Contract still has funds")
|
||||
(when (multisig/is-confirmed? contract-address confirm-id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user