-
Notifications
You must be signed in to change notification settings - Fork 5k
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
GABA: Integrate CurrencyRateController #5844
Conversation
@@ -40,7 +40,9 @@ class ComposableObservableStore extends ObservableStore { | |||
getFlatState () { | |||
let flatState = {} | |||
for (const key in this.config) { | |||
flatState = { ...flatState, ...this.config[key].getState() } | |||
const controller = this.config[key] | |||
const state = controller.getState ? controller.getState() : controller.state |
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.
This is a temporary patch to ComposableObservableStore
to provide GABA API compatibility. Once we're fully on GABA, this entire module goes away and we'll be using gaba/ComposableController
instead.
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 add a comment here outlining the two cases we're handling and noting the conditions under which we'd remove this logic?
ef32ea7
to
6038879
Compare
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!
app/scripts/lib/getObjStructure.js
Outdated
@@ -7,7 +7,7 @@ module.exports = getObjStructure | |||
|
|||
// { | |||
// "data": { | |||
// "CurrencyController": { | |||
// "CurrencyRatesController": { |
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 assume this is part of a global search and replace, but in that case shouldn't be CurrencyRateController, without the s ?
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.
Great catch, this was a manual update. Fixed.
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! Ping me once the tests are passing and I'll approve again.
6038879
to
ec8285d
Compare
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!
@@ -40,7 +40,9 @@ class ComposableObservableStore extends ObservableStore { | |||
getFlatState () { | |||
let flatState = {} | |||
for (const key in this.config) { | |||
flatState = { ...flatState, ...this.config[key].getState() } | |||
const controller = this.config[key] | |||
const state = controller.getState ? controller.getState() : controller.state |
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 add a comment here outlining the two cases we're handling and noting the conditions under which we'd remove this logic?
@@ -0,0 +1,22 @@ | |||
const clone = require('clone') | |||
|
|||
const version = 30 |
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.
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.
Two small things:
- I think we should pin the version of GABA we're pulling in
- Can we add a few quick tests for the migration we're introducing?
@@ -145,6 +145,7 @@ | |||
"fast-levenshtein": "^2.0.6", | |||
"file-loader": "^1.1.11", | |||
"fuse.js": "^3.2.0", | |||
"gaba": "^1.0.0-beta.45", |
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 should pin this exactly so that we're not automatically pulling in new prereleases
I'm closing this for now as this will require some work to update (might be worth creating a new PR) |
This pull request adds
gaba/CurrencyRateController
to the extension.