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-570] Update "View wallet's public key" feature #2429

Merged

Conversation

thedanheller
Copy link
Member

@thedanheller thedanheller commented Mar 3, 2021

This PR updates the "View wallet's public key" feature.

Todos

  • Re-enable functionality in the constant variable
  • Implement the password dialog
  • Change the field logic to trigger the dialog
  • Update the API request
  • Enable "view wallet's public key" option for HW
  • Show HW public keys in bech32 format

Screenshots

Screen Shot 2021-03-03 at 17 49 32
Screen Shot 2021-03-03 at 17 50 08


Testing Checklist

Test Cases

Scenario 1: Reveal spending password textfield
Given I am on <wallet_type> wallet
When I select reveal button
Then a dialog box appears
And it displays spending password textfield

|wallet_type|
|shelley|


Scenario 2: Reveal public key first time
Given I am on <wallet_type> wallet
And I have correctly entered spending password
When I select reveal wallet public key button
Then wallet public key is displayed in textfield

|wallet_type|
|shelley|


Scenario 3: Reveal public key after successfully displayed the first time
Given I am on <wallet_type> wallet
When I select reveal button
Then the public key is displayed in the textfield

|wallet_type|
|shelley|

Scenario 4: Copy public key
Given public key is displayed in the textfield
When I select copy button
Then public key is copied
And can be pasted correctly

Scenario 5: Show QR code
Given public key is displayed in the textfield
When I select show QR code
Then QR code dialog box is displayed
And wallet public key is displayed

Scenario 6: Hide public key
Given public key is displayed in the textfield
When I select hide button
Then public key is hidden

Scenario 7: Reveal public key after hidden
Given public key is hidden
When I select reveal button
Then public key is displayed in textfield


Scenario 8: Reveal public key first time for hardware wallet
Given I am on hardware wallet
When I select reveal wallet public key button
Then wallet public key is displayed in textfield

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

@thedanheller thedanheller removed the WIP label Mar 3, 2021
Tomislav Horaček added 2 commits March 9, 2021 17:55
… of github.com:input-output-hk/daedalus into feature/ddw-570-update-view-wallets-public-key-feature
@tomislavhoracek
Copy link
Contributor

tomislavhoracek commented Mar 9, 2021

@daniloprates @nikolaglumac Support for Hardware Wallets public key improved. Now we have bech32 format for HW xpub.

@nikolaglumac nikolaglumac removed the WIP label Mar 9, 2021
@darko-mijic
Copy link
Contributor

Reviewing this now...

@darko-mijic
Copy link
Contributor

Reveal public key should open the popup for hardware wallets as for software wallets.

@darko-mijic
Copy link
Contributor

Strike my previous comment. We should not be opening the window with the QR code for sw wallets. Remove that, please.

Copy link
Contributor

@alexander-rukin alexander-rukin 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 to me

@nikolaglumac
Copy link
Contributor

Strike my previous comment. We should not be opening the window with the QR code for sw wallets. Remove that, please.

Done!

miorsufianiohk
miorsufianiohk previously approved these changes Mar 9, 2021
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.

LGTM. Great job @nikolaglumac 👍

@gabriela-ponce
Copy link

@daniloprates I found these issues on 17048:

  • When syncing hardware wallets a password is requested to reveal the public key. Check this video.
  • If you insert a short password the message reads "An error occurred" instead of "Incorrect wallet password". Check this video.

@nikolaglumac
Copy link
Contributor

@gabriela-ponce @miorsufianiohk @darko-mijic all issues fixed!

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.

Hi @daniloprates . On 17052 I have narrowed down the issue that we are facing with spending password dialog box for hw wallet. cc: @nikolaglumac

I found this:

  1. For HW wallet, when I pressed reveal button (Result: Spending password dialog box displayed)
  2. I dismissed the spending password dialog box
  3. Then, I went to SW wallet, pressed reveal button (Result: Spending password dialog box displayed)
  4. I dismissed the spending password dialog box
  5. I went back to HW wallet and pressed reveal button (Result: no spending dialog box displayed anymore and public key is populated in textfield)
  6. After this going back and forth SW and HW wallets, don't make HW wallets spending password dialog to come up again.

For further info please watch video

@nikolaglumac
Copy link
Contributor

@miorsufianiohk all these issues have just been fixed.

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.

LGTM. Great job @nikolaglumac 👍 . Tested on 17055

@nikolaglumac nikolaglumac merged commit a175cb0 into develop Mar 10, 2021
@iohk-bors iohk-bors bot deleted the feature/ddw-570-update-view-wallets-public-key-feature branch March 10, 2021 10:20
@nikolaglumac nikolaglumac added release-4.0.2-FC3 Daedalus Flight and removed ⏳release-vNext labels Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants