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

CurrencyRatesController: add baseAsset support #30

Merged
merged 5 commits into from
Nov 27, 2018

Conversation

bitpshr
Copy link
Contributor

@bitpshr bitpshr commented Nov 27, 2018

This pull request cleans up CurrencyRatesController and adds support for a new configuration parameter: baseAsset.

@codecov-io
Copy link

codecov-io commented Nov 27, 2018

Codecov Report

Merging #30 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #30   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          18     18           
  Lines         889    891    +2     
  Branches       97     97           
=====================================
+ Hits          889    891    +2
Impacted Files Coverage Δ
src/CurrencyRateController.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2098be...c1046d9. Read the comment docs.

@bitpshr bitpshr force-pushed the currency-rates-cleanup branch 2 times, most recently from c71b81f to f93194e Compare November 27, 2018 17:13
const baseAsset = 'FOO';
const controller = new CurrencyRateController({ baseAsset });
const mock = stub(window, 'fetch');
(window.fetch as SinonStub).returns(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use mock here instead of casting window.fetch? mock should have .returns on it, I think.

Also we might be able to use .resolves(x) instead of .returns(Promise.resolve(x)) here.

Copy link
Contributor

@brunobar79 brunobar79 left a comment

Choose a reason for hiding this comment

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

LGTM! Just one question about deps.

"percentile": "^1.2.1",
"uuid": "^3.3.2",
Copy link
Contributor

@brunobar79 brunobar79 Nov 27, 2018

Choose a reason for hiding this comment

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

I couldn't find where you are using this dep. in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We were missing it, it's used in TransactionController.

@bitpshr bitpshr merged commit 7472822 into master Nov 27, 2018
@bitpshr bitpshr deleted the currency-rates-cleanup branch November 27, 2018 20:48
mcmire pushed a commit to mcmire/core that referenced this pull request Jul 17, 2023
* 3.0.3

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Maarten Zuidhoorn <[email protected]>
kanthesha pushed a commit that referenced this pull request Sep 19, 2023
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
MajorLift pushed a commit that referenced this pull request Oct 12, 2023
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.

4 participants