Skip to content

Commit

Permalink
Merge pull request #626 from UnitapApp/fix/requirements/delegate-requ…
Browse files Browse the repository at this point in the history
…irements-bug

fixed arguments passing
  • Loading branch information
alimaktabi authored Sep 17, 2024
2 parents ef9080e + 1b97651 commit 2b0df88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/constraints/arbitrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ def is_observed(self, *args, **kwargs) -> bool:
for user_address in self.user_addresses:
try:
address = token_client.to_checksum_address(user_address)
delegated_address = token_client.get_delegates_address()
if (
delegated_address = token_client.get_delegates_address(user_address)
if not delegated_address or (
ConstraintParam.ADDRESS.name in self.param_keys()
and delegated_address.lower()
!= self.param_values[ConstraintParam.ADDRESS.name].lower()
Expand Down
4 changes: 2 additions & 2 deletions core/constraints/optimism.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def is_observed(self, *args, **kwargs) -> bool:
for user_address in self.user_addresses:
try:
address = token_client.to_checksum_address(user_address)
delegated_address = token_client.get_delegates_address()
if (
delegated_address = token_client.get_delegates_address(user_address)
if not delegated_address or (
ConstraintParam.ADDRESS.name in self.param_keys()
and delegated_address.lower()
!= self.param_values[ConstraintParam.ADDRESS.name].lower()
Expand Down

0 comments on commit 2b0df88

Please sign in to comment.