Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ShayanShiravani committed Aug 18, 2024
1 parent fb0cfb8 commit 07e80c9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions core/constraints/arbitrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,13 @@ def is_observed(self, *args, **kwargs) -> bool:
try:
address = token_client.to_checksum_address(user_address)
delegated_address = token_client.get_delegates_address()
target_address = (
self.param_values[ConstraintParam.ADDRESS.name].lower()
if ConstraintParam.ADDRESS.name in self.param_keys()
else Web3Utils.ZERO_ADDRESS
)
if delegated_address.lower() != target_address:
if not self.param_keys():
if delegated_address.lower() != Web3Utils.ZERO_ADDRESS:
return True
elif (
delegated_address.lower()
!= self.param_values[ConstraintParam.ADDRESS.name].lower()
):
continue
balance = token_client.get_non_native_token_balance(address)
delegated_power += balance
Expand Down

0 comments on commit 07e80c9

Please sign in to comment.