Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Importing account from private key wasn't possible #185

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/aleph_client/commands/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
def create(
private_key: Optional[str] = typer.Option(None, help=help_strings.PRIVATE_KEY),
private_key_file: Optional[Path] = typer.Option(
..., help=help_strings.PRIVATE_KEY_FILE
None, help=help_strings.PRIVATE_KEY_FILE
),
replace: bool = False,
debug: bool = False,
Expand All @@ -53,7 +53,7 @@ def create(
if private_key is not None:
# Validate the private key bytes by instantiating an account.
_load_account(private_key_str=private_key, account_type=ETHAccount)
private_key_bytes = private_key.encode()
private_key_bytes = bytes.fromhex(private_key)
else:
private_key_bytes = generate_key()

Expand Down
Loading