From 096071d7425429d7bb00e10eb84fe24d87245630 Mon Sep 17 00:00:00 2001 From: Mikko Ohtamaa Date: Wed, 10 Jul 2024 23:52:53 +0900 Subject: [PATCH] Better private key import message --- eth_defi/hotwallet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth_defi/hotwallet.py b/eth_defi/hotwallet.py index c8412be5..e1be1599 100644 --- a/eth_defi/hotwallet.py +++ b/eth_defi/hotwallet.py @@ -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)