-
Notifications
You must be signed in to change notification settings - Fork 171
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
Create seed with coin flips #619
base: dev
Are you sure you want to change the base?
Conversation
- add menu entry and views
- add icons (coins ion for the seed menu and T/H for head and tails)
- add coin flip screen
- add number of flips constants
- change layout to 3, 3 similar to the dice screen
- change order of H and T
- add missing space in menu entry
- add pytest tests similar to the tests for dice rolls
- fix copy/paste error
class ToolsCoinEntropyMnemonicLengthView(View): | ||
def run(self): | ||
TWELVE = f"12 words ({mnemonic_generation.COIN__NUM_FLIPS__12WORD} flips)" | ||
TWENTY_FOUR = f"24 words ({mnemonic_generation.COIN__NUM_FLIPS__24WORD} flips)" |
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.
Moving these constants to be class-level attrs will allow us to specify 12 vs 24 in various FlowTest scenarios.
I think this was my fault (definitely not yours), but now that we're actually exposing the coin flip code to users,
I realize that the |
Confirmed that the unit tests match the expected results in iancoleman.io |
Would ideally have 2-3 FlowTests:
(the current |
Also, tagging in @easyuxd for thoughts on the "H" and "T" keyboard icons. They're being pulled from the FontAwesome pack, not our UI font. |
Should also include new screenshots in |
Since we're trying to get away from using FontAwesome icons, can we swap the "H" and "T" for the regular Open Sans characters? Adding a coinflip icon to our SeedSigner icon set is a to-do for me, so I'm okay with using this FontAwesome stack-of-coins icon as a placeholder in the menu until I can replace it. |
@easyuxd : Would this be better? 1) Initially I tried to do it exactly like the dice roll seed creation. Only copying the ...dice... functions/constants etc and changed 'dice' to 'coin'. I had a hard time finding icons and decided to use H and T, but so, using these awesomefont characters the buttons had the same size as in the dice creation screen. Or without the additional texts: 3) @kdmukai : As mentioned in the chat, the same changes as proposed above will need to be done for the dice roll scenario as well, I guess. |
@BtcAutoNode I can't speak to a previous coin-flip effort, either @kdmukai or @newtonick should know. |
- delete heads/tails icon (and stick to normal letters instead of icons (as easyuxd proposed)
- changed coin flip screen) to reflect changes proposed by easyuxd)
Description
Describe the change simply. Provide a reason for the change.
Creation of seeds via entropy input from coin flips.
Include screenshots of any new or modified screens (or at least explain why they were omitted)
This pull request is categorized as a:
Checklist
pytest
and made sure all unit tests pass before sumbitting the PRIf you modified or added functionality/workflow, did you add new unit tests?
I have tested this PR on the following platforms/os:
Note: Keep your changes limited in scope; if you uncover other issues or improvements along the way, ideally submit those as a separate PR. The more complicated the PR the harder to review, test, and merge.