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-759] Over-saturation warning #2733

Merged
merged 22 commits into from Nov 9, 2021

Conversation

mchappell
Copy link
Contributor

@mchappell mchappell commented Nov 5, 2021

This PR adds warning message in the delegation wizard to warn users if over-saturation will occur when delegation to a pool.

Todos

  • Create component
  • Update delegation wizard to check if over-saturation will occur
  • Update storybook

Screenshots

Screenshot 2021-11-09 at 10 40 15

Screenshot 2021-11-09 at 10 40 21

Screenshot 2021-11-09 at 10 40 37

Screenshot 2021-11-09 at 10 40 40

Testing Checklist

Test Scenario

Scenario:Delegate wallet that results in oversaturated pool
Given I have a wallet with ADA
And there is a pool which is nearly saturated or oversaturated
And if I delegate the wallet to the pool, the pool will become oversaturated
When I delegate the wallet to the pool
Then at CHOOSE A STAKE POOL - STEP 2 OF 3
And at CONFIRM DELEGATION - STEP 3 OF 3
I will observe this “warning_message” (Note: % will differ depending on the oversaturation level)

warning_message
The selected stake pool will become oversaturated by 115%, which will reduce future rewards for all delegators to that pool.
選択したステークプールに委任すると飽和率が115%になり、このプールへのすべての委任者が今後受け取る報酬が減少します。

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

@mchappell mchappell self-assigned this Nov 5, 2021
@mchappell mchappell changed the title Feature/ddw 759 oversaturation warning [DDW-759] Over-saturation warning Nov 5, 2021
@mchappell mchappell removed the WIP label Nov 5, 2021
@gabriela-ponce
Copy link

@mchappell Here's a list of the issues @dmitrii-gaico and I found on 19556:

  • When the pool is already delegated to an oversaturated pool, you can still see the error on step 2. Check this video.
  • The messages for retiring pools and oversaturation look different. Check this video.
  • Fee calculation takes longer (or doesn't calculate at all) when you delegate from the stake pools screen (instead of delegation center). Works as expected on production and develop. Check this video.

@mchappell
Copy link
Contributor Author

@mchappell Here's a list of the issues @dmitrii-gaico and I found on 19556:

  • When the pool is already delegated to an oversaturated pool, you can still see the error on step 2. Check this video.
  • The messages for retiring pools and oversaturation look different. Check this video.
  • Fee calculation takes longer (or doesn't calculate at all) when you delegate from the stake pools screen (instead of delegation center). Works as expected on production and develop. Check this video.

@gabriela-ponce

  • Already delegated pools now ignored from over-saturation calculation
  • Existing font choice for retiring message (incorrect) now updated to match designs
  • Fee calculations fixed for both from delegation and stake pools list

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. Tested on 19570. Great work @mchappell 👍

@ManusMcCole ManusMcCole self-requested a review November 8, 2021 10:01
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.

Good work @mchappell 👍

Copy link
Contributor

@tomislavhoracek tomislavhoracek left a comment

Choose a reason for hiding this comment

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

@mchappell 💯 🚀

@nikolaglumac nikolaglumac self-requested a review November 9, 2021 10:56
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 @mchappell 🎉

@nikolaglumac nikolaglumac merged commit 8b2d51f into develop Nov 9, 2021
@iohk-bors iohk-bors bot deleted the feature/ddw-759-oversaturation-warning branch November 9, 2021 10:57
@nikolaglumac nikolaglumac added release-4.5.0 Daedalus Mainnet and removed ⏳release-vNext labels Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature release-4.5.0 Daedalus Mainnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants