Skip to content

Commit

Permalink
fix some bugz
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamad Bastin committed Nov 1, 2023
1 parent 70e4c06 commit 3b4f72d
Showing 1 changed file with 2 additions and 4 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

0 comments on commit 3b4f72d

Please sign in to comment.