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-543] Update bignumber.js from v5 to v9 #2305

Merged
merged 6 commits into from
Jan 25, 2021

Conversation

DominikGuzei
Copy link
Member

@DominikGuzei DominikGuzei commented Jan 18, 2021

This PR updates the dependency bignumber.js from version 5 to 9 and fixes all breaking API changes summarized here: https://github.com/MikeMcl/bignumber.js/blob/master/CHANGELOG.md

Note: there should not be any changes in the UX / UI anywhere.

This is a preparation PR for DDW-543 Support Any Number in Numeric Input since it makes sense to test this in advance.


Testing Checklist

  • Slack QA thread
  • Since this PR touches many number calculations it's important to test anything related to transaction amounts (sending/receiving/display etc.) in the whole application

Test Cases

Scenario 1: Transaction is the same as current production build
Given I have a fully synced <wallet_type> wallet
And the wallet has enough ada for transaction
When I send ada to another wallet
Then the transaction is correct
And the displayed transaction is the same as shown by current production build with the same <wallet_type>

|wallet_type|
|Byron|
|Shelley|
|Hw wallet|



Scenario 2: Static comparison of numeric display
Given I have current production build
And the current production build has wallet with transactions
And the wallet has been delegated
And I have current PR build
And the current PR build has the same wallet as production build
When I conduct static analysis by comparing both builds on <region> area
Then they are exactly the same

|region|
|Wallet - Summary|
|Wallet - Send|
|Wallet - Receive|
|Wallet - Transactions|
|Wallet - More - Settings|
|Wallet - More - Wallet UTXO distribution|
|Stake pool - Delegation center|
|Stake pool - Stake pools|
|Stake pool - Rewards| 
|Stake pool - Info|
|Redeem ITN Rewards|
|Settings|

Test Summary

Test results for build 16002

Test cases Results Note
Scenario 1 Passed
Scenario 2: Stake pool - Stake pools Failed When I selected this option, Daedalus went blank and TypeError: w.amount.greaterThanOrEqualTo is not a function displayed on console. Please see video attachment
Scenario 2: Stake pool - Delegation centre Failed When I clicked on "Redelegate", Daedalus went blank and TypeError: walletAmount.equals is not a function at DelegationSetupWizardDialogContainer._this.handleIsWalletAcceptable displayed on console. Please see video attachment
Scenario 2: Redeem ITN Rewards Failed During redeeming ITN reward, upon clicking 'Continue' button, the syncing animation showed, never went away and nothing happened. No console error. Please see video attachment

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

@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 @DominikGuzei .
The following are failures for build 16002:

Test cases Results Note
Scenario 2: Stake pool - Stake pools Failed When I selected this option, Daedalus went blank and TypeError: w.amount.greaterThanOrEqualTo is not a function displayed on console. Please see video attachment
Scenario 2: Stake pool - Delegation centre Failed When I clicked on "Redelegate", Daedalus went blank and TypeError: walletAmount.equals is not a function at DelegationSetupWizardDialogContainer._this.handleIsWalletAcceptable displayed on console. Please see video attachment
Scenario 2: Redeem ITN Rewards Failed During redeeming ITN reward, upon clicking 'Continue' button, the syncing animation showed, never went away and nothing happened. No console error. Please see video attachment

@DominikGuzei
Copy link
Member Author

@mioriohk I pushed some changes that should at least fix the issues regarding the stake pools scenarios 👍

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 on 16014 👍

@DominikGuzei DominikGuzei merged commit 092b42b into develop Jan 25, 2021
@iohk-bors iohk-bors bot deleted the feature/ddw-543-update-bignumber-library branch January 25, 2021 11:35
@nikolaglumac nikolaglumac added release-3.3.0 Daedalus Mainnet release-3.3.0-FC1 Daedalus Flight and removed ⏳release-vNext labels Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore release-3.3.0-FC1 Daedalus Flight release-3.3.0 Daedalus Mainnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants