From 3b4f72d606e1a321325ab84ed7fa9d3b6087daee Mon Sep 17 00:00:00 2001 From: Mohamad Bastin Date: Wed, 1 Nov 2023 19:53:30 +0100 Subject: [PATCH 1/2] fix some bugz --- faucet/models.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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: From c52b8fefb836702aed69a2cd384c1c8b321335a0 Mon Sep 17 00:00:00 2001 From: Mohamad Bastin Date: Wed, 1 Nov 2023 19:56:57 +0100 Subject: [PATCH 2/2] fix some bugz --- tokenTap/constraints.py | 1 + tokenTap/models.py | 2 +- tokenTap/serializers.py | 1 + tokenTap/views.py | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) 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,