Skip to content

Commit

Permalink
Better private key import message
Browse files Browse the repository at this point in the history
  • Loading branch information
miohtama committed Jul 10, 2024
1 parent 16ceb1d commit 096071d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth_defi/hotwallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def from_private_key(key: str) -> "HotWallet":
:return: Ready to go hot wallet account
"""
assert type(key) == str
assert key.startswith("0x"), f"This system assumes private keys are prefixed with 0x, your key starts with {key[0:4]}..."
assert key.startswith("0x"), f"This system assumes private keys are prefixed with 0x, your key starts with {key[0:4]}... Please add 0x prefix to your private key hex string"
account = Account.from_key(key)
return HotWallet(account)

Expand Down

0 comments on commit 096071d

Please sign in to comment.