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-657] Fix blank currency selection after updating to 4.0.5 #2529

Conversation

thedanheller
Copy link
Member

@thedanheller thedanheller commented Apr 20, 2021

This PR fixes blank currency selection after updating to 4.0.5

Todos

  • Change the localStorage to store only the currency code
  • update Wallets store to grab the currency from the local stored currency code

Old localStorage currency format

	"staging-CURRENCY-SELECTED": {
		"symbol": "brl",
		"decimalDigits": 2,
		"name": "Brazilian Real",
		"symbolNative": ""
	}

New localStorage currency format

	"staging-CURRENCY-SELECTED": "brl"

Steps to test

Daedalus builds

  1. Run a Daedalus version older than 4.0.5 and set a currency different than USD;
  2. Run Daedalus 4.0.5 version: the currency should be broken as described at the Jira card;
  3. Run this PR's build: the currency feature should be working normally.

Running Daedalus locally

  1. Set the CURRENCY-SELECTED value at config.json to:
	"[ENVIRONMENT]-CURRENCY-SELECTED": {
		"symbol": "brl",
		"decimalDigits": 2,
		"name": "Brazilian Real",
		"symbolNative": ""
	}
  1. Run Daedalus in the develop branch: the currency should be broken as described at the Jira card;
  2. Run Daedalus in the branch fix/ddw-657-fix-blank-currency-selection-after-updating-to-4-0-5: the currency feature should be working normally.

Screenshots

With error

image
image

Without error

Screen Shot 2021-04-20 at 11 47 03
Screen Shot 2021-04-20 at 11 47 10
Screen Shot 2021-04-20 at 11 47 17
Screen Shot 2021-04-20 at 11 47 22


Testing Checklist


Test Scenario

Scenario 1 - Validate is the balance is displayed on other currencies

Given that Daedalus 4.0.4 is installed
And It has a wallet
And the option to show balance in other currencies is enabled in "Settings- Wallets"
When I update to 4.0.5
And I check the option to show balance in other currencies
Then I can see the dropdown maintains the selection as it was on 4.0.4
And I can see the balance on the wallet is displayed on the selected currency

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

@gabriela-ponce gabriela-ponce self-requested a review April 20, 2021 16:51
Copy link

@gabriela-ponce gabriela-ponce 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 🎉

@nikolaglumac nikolaglumac merged commit cec3b21 into develop Apr 20, 2021
@iohk-bors iohk-bors bot deleted the fix/ddw-657-fix-blank-currency-selection-after-updating-to-4-0-5 branch April 20, 2021 19:10
@nikolaglumac nikolaglumac added release-4.1.0 Daedalus Mainnet release-4.1.0-FC1 Daedalus Flight and removed ✈️ release-4.1.0-FC1 labels Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug release-4.1.0-FC1 Daedalus Flight release-4.1.0 Daedalus Mainnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants