Skip to content

[NMA-1105] Currency selector problems - #851

Merged
HashEngineering merged 1 commit into
masterfrom
bugfix-currency-selector
Dec 27, 2021
Merged

HashEngineering merged 1 commit into
masterfrom
bugfix-currency-selector

Conversation

@Syn-McJ

@Syn-McJ Syn-McJ commented Dec 27, 2021 •

Copy link
Copy Markdown
Member

After making a payment with non-default currency, opening the currency selector again shows the wrong currency.

Issue being fixed or feature implemented

The way I see it, the problem here is that we have a bunch of code in the ExchangeRatesFragment to decide which currency to show as selected. Because this code is independent of the one in the Enter Amount screen, it can get unsynchronized and we will have different currencies.

To prevent this problem from occurring again, we should move the responsibility of deciding selected currency to the caller of ExchangeRatesFragment, it itself should not make this decision unless no currency is specified. This way, whichever currency the caller has as default, ExchangeRatesFragment will have as selected.

Related PR's and Dependencies

Screenshots / Videos

How Has This Been Tested?

  • QA (Mobile Team)

Checklist:

  • I have performed a self-review of my own code and added comments where necessary
  • I have added or updated relevant unit/integration/functional/e2e tests

@Syn-McJ Syn-McJ self-assigned this Dec 27, 2021

@ClaudeHangui ClaudeHangui left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok by me!

@HashEngineering HashEngineering left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks great. 21 lines added and removed, and the ExchangeRatesFragment code is more simple.

@HashEngineering
HashEngineering merged commit 517e0c2 into master Dec 27, 2021
@Syn-McJ
Syn-McJ deleted the bugfix-currency-selector branch December 28, 2021 04:43
@Syn-McJ
Syn-McJ restored the bugfix-currency-selector branch January 10, 2022 10:07
@HashEngineering
HashEngineering deleted the bugfix-currency-selector branch January 18, 2022 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants