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

[DDW-639] Fund5 voting registration with Ledger #2538

Merged

Conversation

tomislavhoracek
Copy link
Contributor

@tomislavhoracek tomislavhoracek commented Apr 27, 2021

This PR Introduces Catalyst voting registration with Ledger devices

Todos

  • Construct auxiliary data and pass to Ledger using "experimental feature" on the Ledger device
  • Update Ledger JS to 3.1.0. RC version which includes voting https://github.com/vacuumlabs/ledgerjs-cardano-shelley/releases/tag/v3.1.0-catalyst-rc.4
  • Prepare cbor txBody and test tx send data
  • Check all TODO's and unblock regular voting registration blocked just for testing purpose
  • Disable Trezor voting registration ( Ledger enabled )
  • Check if we need additional message since HW are now enabled but Trezor is not supported
  • Add proper Flow Types on Ledger Voting part instead of temporary any declaration
  • Update Min Cardano APP version declaration to fit the latest Voting Feature
  • Remove faked Voting config modified for the testing purposes - DO NOT MERGE

Voting registration CWB bug and related threads:
https://jira.iohk.io/browse/ADP-1005
https://input-output-rnd.slack.com/archives/GGKHNC5V4/p1623929752061200
https://input-output-rnd.slack.com/archives/C819S481Y/p1623941347111200


Testing Checklist

  • Slack QA thread
  • Test Voting Registration with hardware wallet - Ledger ONLY!
  • Check if Voting Registration is still working properly for Regular "Software" wallets
  • Send one regular transaction with Ledger hardware wallet just to check that something is not broken with additional logic

Screenshots

English

Screen Shot 2021-07-05 at 16 16 32

Screen Shot 2021-07-05 at 16 16 43

Screen Shot 2021-07-05 at 16 16 47

Screen Shot 2021-07-05 at 16 17 08

Screen Shot 2021-07-05 at 16 17 15

Screen Shot 2021-07-05 at 16 17 19

Screen Shot 2021-07-05 at 16 17 45

Screen Shot 2021-07-05 at 16 17 50

Screen Shot 2021-07-05 at 16 19 30

Screen Shot 2021-07-05 at 16 20 13

Screen Shot 2021-07-05 at 16 20 18

Japanese

Screen Shot 2021-07-05 at 16 24 47

Screen Shot 2021-07-05 at 16 21 04

Screen Shot 2021-07-05 at 16 21 11

Screen Shot 2021-07-05 at 16 21 17

Screen Shot 2021-07-05 at 16 21 37

Screen Shot 2021-07-05 at 16 21 42

Screen Shot 2021-07-05 at 16 22 09

Screen Shot 2021-07-05 at 16 22 20

Screen Shot 2021-07-05 at 16 23 42

Screen Shot 2021-07-05 at 16 24 47

Screen Shot 2021-07-05 at 16 24 52


##Test Cases

Scenario 1 - Test Ledger non voting functionality
Given that I have a Ledger hardware Wallet loaded in Daedalus
And I test transaction and delegation
Then all functionality works as expected

Scenario 2 - Test Voting for non software wallets
Given that I have a software wallet loaded in Daedalus
When I test all voting features for software wallets
Then all functionality works as expected

Scenario 3 - Ensuring voting screen is visible and register to vote button is working
Given that I have a Ledger hardware Wallet loaded in Daedalus
And I navigate to the voting screen
Then I see the “Register to Vote” Screen
And the register to vote button is enabled

Scenario 4 - Register for voting
Given that I have a Ledger hardware Wallet loaded in Daedalus
And I have clicked the register to vote button
Then I should see the register to vote screen
And I should be asked to select which wallet I plan to use from the dropdown
And if the wallet has enough funds the Continue button should be enabled

Scenario 5 - Register for voting part 2
Given I have completed scenario 4
When I enter my wallet’s correct password
Then Submit Registration Transaction button should be visible and enabled
And when I click on Submit Registration Transaction
Then the Confirmation of voting Registration step should be visible in Daedalus 
And a progress bar should be visible to tell the user how close it is to being confirmed

Scenario 6 - Register for voting part 3
Given that the Confirmation of voting Registration step progress bar has completed all 10 steps
And the Continue button is enabled
When I click continue
Then Daedalus should proceed to the next step entitled PIN

Scenario 7 - Register for voting part 4
Given I have completed scenario 6 and I am on the pin entry step of voting registration
When I enter a valid pin in both the pin entry and pin re-entry boxes
Then the pin is accepted and I am brought to the QR code step of Voting registration

Scenario 8 - Register for voting part 4
Given I have completed scenario 7
Then I Should see the QR code image on the screen
And I should see 2 check boxes I have to tick to acknowledge I need to save PDF in order to participate in voting
And I should have the option to save as PDF
When I click not the button
Then the pdf is saved
And I can close the screen

Review Checklist

Basics

  • PR has been assigned and has appropriate labels (feature/bug/chore, release-x.x.x)
  • PR is updated to the most recent version of the target branch (and there are no conflicts)
  • PR has a good description that summarizes all changes
  • PR has default-sized Daedalus window screenshots or animated GIFs of important UI changes:
    • In English
    • In Japanese
  • CHANGELOG entry has been added to the top of the appropriate section (Features, Fixes, Chores) and is linked to the correct PR on GitHub
  • Automated tests: All acceptance and unit tests are passing (yarn test)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in development build (yarn dev)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in production build (yarn package / CI builds)
  • There are no flow errors or warnings (yarn flow:test)
  • There are no lint errors or warnings (yarn lint)
  • There are no prettier errors or warnings (yarn prettier:check)
  • There are no missing translations (running yarn manage:translations produces no changes)
  • Text changes are proofread and approved (Jane Wild / Amy Reeve)
  • Japanese text changes are proofread and approved (Junko Oda)
  • UI changes look good in all themes (Alexander Rukin)
  • Storybook works and no stories are broken (yarn storybook)
  • In case of dependency changes yarn.lock file is updated

Code Quality

  • Important parts of the code are properly commented and documented
  • Code is properly typed with flow
  • React components are split-up enough to avoid unnecessary re-renderings
  • Any code that only works in main process is neatly separated from components

Testing

  • New feature/change is covered by acceptance tests
  • New feature/change is manually tested and approved by QA team
  • All existing acceptance tests are still up-to-date
  • New feature/change is covered by Daedalus Testing scenario
  • All existing Daedalus Testing scenarios are still up-to-date

After Review

  • Merge the PR
  • Delete the source branch
  • Move the ticket to done column on the YouTrack board
  • Update Slack QA thread by marking it with a green checkmark

Copy link

@ManusMcCole ManusMcCole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @tomislavhoracek 👍

Copy link

@miorsufianiohk miorsufianiohk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on Nano X. Tested on Mac, Linux and Windows on build 18498. Great work @tomislavhoracek 👍

@nikolaglumac nikolaglumac merged commit bcec8b3 into develop Jul 6, 2021
@iohk-bors iohk-bors bot deleted the feature/ddw-639-fund5-voting-registration-with-ledger branch July 6, 2021 12:45
@nikolaglumac nikolaglumac added release-4.2.0 Daedalus Mainnet and removed ⏳release-vNext labels Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature release-4.2.0 Daedalus Mainnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants