-
Notifications
You must be signed in to change notification settings - Fork 10
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
Clear clipboard of the mnemonic #130
Conversation
2405c0b
to
d4106aa
Compare
Test Coverage: Download HTML Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be documented in:
- https://github.com/eth-educators/ethstaker-deposit-cli/blob/main/docs/src/new_mnemonic.md
- https://github.com/eth-educators/ethstaker-deposit-cli/blob/main/docs/src/existing_mnemonic.md
and probably on the CLI help and on the user screen when performing the task with something along the lines of We will attempt to clear your clipboard after confirming your mnemonic so make sure to write it down somewhere safe first..
d4106aa
to
bce3e69
Compare
Added a warning (and a note in docs) for |
Test Coverage: Download HTML Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems good.
Partially addresses #32
Changes
Use
pyperclip
, which works on macOS, Linux and Windows, to set the clipboard to a space character after user is done inputting dataTypes of changes
What types of changes does your code introduce?
Testing
Requires testing
Remarks
This introduces some host dependencies. Notably on Linux, clipboard mechanisms only exist if a window manager is present. So as to not bomb out on headless Linux, the code is in a
try: except:
"On Windows, no additional modules are needed.
On Mac, this module makes use of the pbcopy and pbpaste commands, which should come with the os.
On Linux, this module makes use of the xclip or xsel commands, which should come with the os. Otherwise run “sudo apt-get install xclip” or “sudo apt-get install xsel” (Note: xsel does not always seem to work.)"