-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #30 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 18 18
Lines 889 891 +2
Branches 97 97
=====================================
+ Hits 889 891 +2
Continue to review full report at Codecov.
|
c71b81f
to
f93194e
Compare
f93194e
to
f3024ad
Compare
src/CurrencyRateController.test.ts
Outdated
const baseAsset = 'FOO'; | ||
const controller = new CurrencyRateController({ baseAsset }); | ||
const mock = stub(window, 'fetch'); | ||
(window.fetch as SinonStub).returns( |
There was a problem hiding this comment.
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.
There was a problem hiding this 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", |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
90b9038
to
c9e55e0
Compare
* 3.0.3 * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: github-actions <[email protected]> Co-authored-by: Maarten Zuidhoorn <[email protected]>
This pull request cleans up
CurrencyRatesController
and adds support for a new configuration parameter:baseAsset
.