Skip to content

CurrencyController can be configured to always fetch usd rate#292

Merged
rekmarks merged 5 commits intodevelopfrom
includeUSDRate
Nov 6, 2020
Merged

CurrencyController can be configured to always fetch usd rate#292
rekmarks merged 5 commits intodevelopfrom
includeUSDRate

Conversation

@danjm
Copy link
Contributor

@danjm danjm commented Oct 27, 2020

For analytics purposes in metamask-extension, we have a need of always knowing the the ETH to USD rate, even when the users selected currency is not USD. This PR updates the CurrencyController so that it can be passed a includeUSDRate config property that ensures that the exchange rate for USD is always fetched, in addition to whatever the currentCurrency is.

danjm and others added 4 commits November 3, 2020 16:57
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
@danjm
Copy link
Contributor Author

danjm commented Nov 3, 2020

@Gudahtt All of your suggested commits were applied (thanks!) and I have rebased this onto develop

@rekmarks rekmarks mentioned this pull request Nov 3, 2020
Gudahtt
Gudahtt previously approved these changes Nov 4, 2020
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@danjm
Copy link
Contributor Author

danjm commented Nov 4, 2020

@danjm
Copy link
Contributor Author

danjm commented Nov 6, 2020

@Gudahtt The remaining test failure here also exists on develop and is unrelated to these changes.

Copy link
Member

@rekmarks rekmarks left a comment

Choose a reason for hiding this comment

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

LGTM!

@rekmarks rekmarks merged commit 282102c into develop Nov 6, 2020
@rekmarks rekmarks deleted the includeUSDRate branch November 6, 2020 20:52
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
* CurrencyController can be configured to always fetch usd rate in addition to currentCurrency rate

* Update unit tests

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
* CurrencyController can be configured to always fetch usd rate in addition to currentCurrency rate

* Update unit tests

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Mrtenz pushed a commit that referenced this pull request Oct 16, 2025
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