Migrations: ensure native currency names & symbols#1468
Merged
goosewobbler merged 4 commits intodevelopfrom Mar 3, 2023
Merged
Migrations: ensure native currency names & symbols#1468goosewobbler merged 4 commits intodevelopfrom
goosewobbler merged 4 commits intodevelopfrom
Conversation
mholtzman
previously approved these changes
Mar 3, 2023
goosewobbler
commented
Mar 3, 2023
goosewobbler
commented
Mar 3, 2023
Contributor
Author
goosewobbler
left a comment
There was a problem hiding this comment.
Nice, saves some space in this test file
Jamchello
approved these changes
Mar 3, 2023
|
|
||
| initial.main.networksMeta.ethereum[id].nativeCurrency = { | ||
| ...nativeCurrency, | ||
| name: nativeCurrency.name || name, |
Contributor
There was a problem hiding this comment.
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?
Contributor
Author
There was a problem hiding this comment.
Actually not sure this works - tests fail
Collaborator
There was a problem hiding this comment.
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
floating
reviewed
Mar 6, 2023
| const { name = '', symbol = '' } = nativeCurrencyMap[id] || {} | ||
| const nativeCurrency = initial.main.networksMeta.ethereum[id].nativeCurrency | ||
|
|
||
| initial.main.networksMeta.ethereum[id].nativeCurrency = { |
Owner
There was a problem hiding this comment.
can we assume that this chain exists in networksMeta?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO: