Skip to content

Commit

Permalink
Merge pull request #170 from UnitapApp/fix/bugz
Browse files Browse the repository at this point in the history
Fix/bugz
  • Loading branch information
Mohamad Bastin authored Nov 1, 2023
2 parents 70e4c06 + c52b8fe commit c0f0141
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
6 changes: 2 additions & 4 deletions faucet/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions tokenTap/constraints.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
2 changes: 1 addition & 1 deletion tokenTap/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down
1 change: 1 addition & 0 deletions tokenTap/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
ConstraintVerification,
OnceInALifeTimeVerification,
OncePerMonthVerification,
OptimismHasClaimedGasInThisRound,
)


Expand Down
1 change: 1 addition & 0 deletions tokenTap/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
ConstraintVerification,
OnceInALifeTimeVerification,
OncePerMonthVerification,
OptimismHasClaimedGasInThisRound,
)
from .helpers import (
create_uint32_random_nonce,
Expand Down

0 comments on commit c0f0141

Please sign in to comment.