Skip to content

Commit

Permalink
adding additional check for key bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
stat committed Nov 25, 2024
1 parent 6db3413 commit f812601
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cdp/wallet_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ def export(self) -> str:
"""
local_account = self.key

if local_account is None:
raise ValueError("Private key is unavailable")

key_bytes = local_account.key
if key_bytes is None:
raise ValueError("Private key is empty")

return key_bytes.hex()

Expand Down

0 comments on commit f812601

Please sign in to comment.