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-149] Undelegating a wallet #2351

Merged
merged 59 commits into from
Feb 19, 2021

Conversation

topseniors
Copy link
Contributor

@topseniors topseniors commented Feb 8, 2021

This PR implemented Undelegate wallet dialog on wallet settings screen
Jira Ticket

Todos

  • Implement Undelegate wallet dialog on wallet settings screen
  • On the "undelegation wizard" rename "Deposits" to "Deposits reclaimed" and show the value in green.

Testing Checklist

App

  • Go to Wallet => Settings and click on Undelegate Wallet button to open Undelegate Wallet confirmation dialog and make sure Undelegate Wallet confirmation dialog matches with wireframe
  • Tick checkboxes and fill in spending password to confirm and make sure Undelegate Wallet result dialog matches with wireframe

Test Cases

Scenario 1 - Delegating a wallet options visible in wallet settings when wallet Undelegated
Given that I have a wallet fully synced in Daedalus
And that wallet has not already been delegated
When I navigate to the wallet settings screen
Then I will see the option to "Delegate your wallet" 
And I will see a button that says "Delegate"

Scenario 2 - Undelegating a wallet options visible in wallet settings when wallet Delegated
Given that I have a wallet fully synced in Daedalus
And that wallet has already been delegated
When I navigate to the wallet settings screen
Then I will see the option "Undelegating your wallet" 
And I will see a button that says "Undelegate"

Scenario 3 - Verify Undelegation wizard available
Given that I have a wallet that has already been delegated
And I navigate to the wallet settings screen
When I click on the "undelegate" button
Then the undelegation wizard should open

Scenario 4 - Verify Delegation wizard available
Given that I have a wallet that has not already been delegated
And I navigate to the wallet settings screen
When I click on the "delegate" button
Then the Delegation wizard should open

Scenario 5 - Verify Undelegation wizard success
Given that I am on the undelegation wizard
And I follow the instructions
When I complete the wizard
Then I should see an undelegation success message

Scenario 6 - Verify Delegation wizard success
Given that I am on the Delegation wizard
And I follow the instructions
When I complete the wizard
Then I should see a Delegation success message

Scenario 7 - Verify Undelegation has been successful
Given that I have completed the undelegation wizard
And I have navigated to the Stake pools screen, delegation centre tab
Then the wallet should be shown as undelegated
And the wallet should have received back the 2ADA Delegation deposit
And I should have the option to delegate wallet
And the delegation change will take place in +2 epochs

Scenario 8 - Verify Delegation has been successful
Given that I have completed the Delegation wizard
And I have navigated to the Stake pools screen, delegation centre tab
Then the wallet should be shown as Delegated
And I should have the option to Undelegate wallet
And the delegation change will take place in 2+epochs

Scenario 9 - Verify Delegate/Undelegate unavailable for a Byron Wallet
Given that I have a Byron Wallet fully synced in Daedalus
WhenI navigate to the wallet settings screen
Then I should not see an option to Delegate/Undelegate

Scenario 10 - Delegate/Undelegate unavailable while wallet is still syncing
Given that I have added a wallet to Daedalus
And it is still in loading state
When when I navigate to wallet settings
Then I see that the Delegation/Undelegation button is inactive
And I see a message explaining that this wallet is currently synchronizing with the blockchain

Screenshots

English

image
image
image
image
image

Japanese

image
image
image
image
image

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 and shows some screenshots or animated GIFs of important UI changes
  • 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

@topseniors topseniors added the WIP label Feb 8, 2021
Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

@yakovkaravelov here's what I have found so far:

  1. When clicking on "Undelegate" button, Daedalus breaks and fallbacks to white-screen with following errors in the console:

Screenshot 2021-02-08 at 09 31 53

  1. The bottom margin is too big - it should match the one from the element above the "Undelegation" box:

margin

  1. "Undelegation" box should be shown only for delegated wallets and never for Byron wallets:

Screenshot 2021-02-08 at 09 31 20

  1. We need to decide what to do while the wallet is restoring. Please start a thread on Slack and ask @darko-mijic and @a-rukin for guidance.

Thanks!

@topseniors
Copy link
Contributor Author

topseniors commented Feb 9, 2021

@nikolaglumac @DeeJayElly @darko-mijic @a-rukin @gnpf @mioriohk Please review/test. Thanks.

@nikolaglumac
Copy link
Contributor

@yakovkaravelov please check the Flow errors too 🙏
(these are caused by the recent merge!)

Screenshot 2021-02-19 at 10 25 27

@ManusMcCole
Copy link

ManusMcCole commented Feb 19, 2021

Hi @yakovkaravelov

The issue we were seeing with software wallets not updating to reflect the recently changed status is also affecting Hardware Wallets. Transaction not visible in the transactions screen.See video

@topseniors topseniors removed the WIP label Feb 19, 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. Only tested undelegated wallet without reward and delegated wallet without reward (as instructed) on build 16647. Both software and Nano X wallets tested. Well done @yakovkaravelov 👍

@topseniors topseniors removed the WIP label Feb 19, 2021
Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

Great work @yakovkaravelov 💯

@nikolaglumac nikolaglumac merged commit bdbb16e into develop Feb 19, 2021
@iohk-bors iohk-bors bot deleted the feature/ddw-149-undelegating-wallet branch February 19, 2021 15:48
@nikolaglumac nikolaglumac added release-3.3.1 Daedalus Mainnet and removed ⏳release-vNext labels Feb 22, 2021
@dbatiste
Copy link

My understanding is that this feature is done, but disabled behind a flag. Any idea when this will be enabled?

@thedanheller
Copy link
Contributor

My understanding is that this feature is done, but disabled behind a flag. Any idea when this will be enabled?

@dbatiste please see: #2636

This feature is currently blocked by an issue in the backend. We are working to have this done as soon as we can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature release-3.3.1 Daedalus Mainnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants