-
Notifications
You must be signed in to change notification settings - Fork 150
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
Migrations: ensure native currency names & symbols #1468
Migrations: ensure native currency names & symbols #1468
Conversation
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.
Nice, saves some space in this test file
|
||
initial.main.networksMeta.ethereum[id].nativeCurrency = { | ||
...nativeCurrency, | ||
name: nativeCurrency.name || name, |
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.
Nit: Using the spread should assign the name from nativeCurrency if it exists, couldn't we set the default data first and then spread on top?
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.
Actually not sure this works - tests fail
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 think this would assign the name to what was in nativeCurrency
even if it were falsy, for example overwriting the new value with empty string, for example
const { name = '', symbol = '' } = nativeCurrencyMap[id] || {} | ||
const nativeCurrency = initial.main.networksMeta.ethereum[id].nativeCurrency | ||
|
||
initial.main.networksMeta.ethereum[id].nativeCurrency = { |
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 assume that this chain exists in networksMeta
?
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.
TODO: