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

Can't use private key instead of private key file parameter in cli mode #122

Open
simbadchains opened this issue Dec 7, 2022 · 1 comment
Labels
bug Something isn't working question Further information is requested

Comments

@simbadchains
Copy link

There is a problem when loading the account in block lines 39-41 in account.py while provided private key as parameter (--private-key TEXT). The private_key_path in the _load_account function is passed from settings.PRIVATE_KEY_FILE which has a default value (device.key). So, whenever I try to pass private key as text in the cli, the default value of the private_key_path is passed as well, invoking the assert "Private key should be a string or a filepath, not both.".

Solution, the assert should check if private_key_path is the default value, if it is the default value and private_key_str is populated, then nullify the private_key_path so private_key_str is taken into consideration along the line (line 43 in account.py).

@aliel
Copy link
Member

aliel commented Dec 8, 2022

Hi @simbadchains

can you share with us:

  • Your platform
  • The version of the Aleph client
  • The command that produces the problem

Thank's

@MHHukiewitz MHHukiewitz added bug Something isn't working question Further information is requested labels Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants