Skip to content

Maintain activeCurrency in CurrencyRateController state - #22

Closed
estebanmino wants to merge 1 commit into
masterfrom
currecy-controller-state
Closed

Maintain activeCurrency in CurrencyRateController state#22
estebanmino wants to merge 1 commit into
masterfrom
currecy-controller-state

Conversation

@estebanmino

Copy link
Copy Markdown
Contributor

This PR allows to maintain activeCurrency in CurrencyRateController in order to persist information in currentCurrency state when the controller is disabled and enabled again.

@estebanminoestebanmino mentioned this pull request Oct 24, 2018
3 tasks

@bitpshrbitpshr 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.

One comment then this looks good.

*/
set currency(currency: string) {
this.activeCurrency = currency;
this.update({ currentCurrency: currency });

@bitpshrbitpshrNov 13, 2018

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.

Since currency is now maintained as state, it doesn't need a getter at all. This whole method can go away now (and the associated tests.) Instead, downstream modules would pass in a new (or initial) currency by setting state.

@bitpshr

Copy link
Copy Markdown
Contributor

Closing in favor of #30, which includes more related cleanup.

@bitpshrbitpshr closed this Nov 27, 2018
@estebanmino
estebanmino deleted the currecy-controller-state branch November 30, 2018 01:23
mcmire pushed a commit to mcmire/core that referenced this pull request Jul 17, 2023
* 3.0.0
* Update changelog
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
MajorLift pushed a commit that referenced this pull request Sep 22, 2023
Mrtenz pushed a commit to Mrtenz/core that referenced this pull request Jun 17, 2026
* 1.1.0
* Change unreleased in v1.1.0 to added
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Matthew Epps <mepps32@gmail.com>
Sign up for freeto 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.

2 participants

@estebanmino@bitpshr