diff --git a/faucet/models.py b/faucet/models.py index affaa022..b87af991 100644 --- a/faucet/models.py +++ b/faucet/models.py @@ -32,13 +32,11 @@ def address(self): try: node = Bip44.FromPrivateKey(binascii.unhexlify(self.private_key), Bip44Coins.ETHEREUM) return node.PublicKey().ToAddress() - except Exception as e: - logging.exception(f"Error getting address for {self.name} error is {e}") + except: # noqa: E722 try: keypair = Keypair.from_base58_string(self.private_key) return str(keypair.pubkey()) - except Exception as e2: - logging.exception(f"Error getting address for {self.name} error is {e2}") + except: # noqa: E722 pass def __str__(self) -> str: diff --git a/tokenTap/constraints.py b/tokenTap/constraints.py index 626ab7c1..0c27b0de 100644 --- a/tokenTap/constraints.py +++ b/tokenTap/constraints.py @@ -1,5 +1,6 @@ from core.constraints import ConstraintVerification from core.utils import TimeUtils +from faucet.constraints import OptimismHasClaimedGasInThisRound # noqa: F401 from faucet.models import ClaimReceipt # class OncePerWeekVerification(ConstraintVerification): diff --git a/tokenTap/models.py b/tokenTap/models.py index 310fedf6..74182032 100644 --- a/tokenTap/models.py +++ b/tokenTap/models.py @@ -4,12 +4,12 @@ from authentication.models import NetworkTypes, UserProfile from core.models import UserConstraint -from faucet.constraints import OptimismHasClaimedGasInThisRound from faucet.models import Chain, ClaimReceipt from .constraints import ( OnceInALifeTimeVerification, OncePerMonthVerification, + OptimismHasClaimedGasInThisRound, TimeUtils, ) diff --git a/tokenTap/serializers.py b/tokenTap/serializers.py index 06ae3fe8..c2600397 100644 --- a/tokenTap/serializers.py +++ b/tokenTap/serializers.py @@ -17,6 +17,7 @@ ConstraintVerification, OnceInALifeTimeVerification, OncePerMonthVerification, + OptimismHasClaimedGasInThisRound, ) diff --git a/tokenTap/views.py b/tokenTap/views.py index 20100018..c1d75792 100644 --- a/tokenTap/views.py +++ b/tokenTap/views.py @@ -31,6 +31,7 @@ ConstraintVerification, OnceInALifeTimeVerification, OncePerMonthVerification, + OptimismHasClaimedGasInThisRound, ) from .helpers import ( create_uint32_random_nonce,