Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ShayanShiravani committed Aug 19, 2024
1 parent f1ccc11 commit 9a1bef6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions core/constraints/arbitrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
ConstraintVerification,
)
from core.thirdpartyapp import Subgraph
from core.utils import InvalidAddressException, TokenClient, Web3Utils
from core.utils import InvalidAddressException, TokenClient


class BridgeEthToArb(ConstraintVerification):
Expand Down Expand Up @@ -82,7 +82,7 @@ def has_bridged(self, from_time=None):
class DelegateArb(ConstraintVerification):
app_name = ConstraintApp.ARBITRUM.value

_param_keys = []
_param_keys = [ConstraintParam.MINIMUM]

ARBITRUM_CHAIN_ID = "42161"
ARB_TOKEN_ABI = [
Expand Down Expand Up @@ -126,11 +126,9 @@ def is_observed(self, *args, **kwargs) -> bool:
try:
address = token_client.to_checksum_address(user_address)
delegated_address = token_client.get_delegates_address()
if not self.param_keys():
if delegated_address.lower() != Web3Utils.ZERO_ADDRESS:
return True
elif (
delegated_address.lower()
if (
ConstraintParam.ADDRESS.name in self.param_keys()
and delegated_address.lower()
!= self.param_values[ConstraintParam.ADDRESS.name].lower()
):
continue
Expand Down

0 comments on commit 9a1bef6

Please sign in to comment.