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

ensure chain exists in networksMeta #1476

Merged
merged 4 commits into from
Mar 7, 2023
Merged

ensure chain exists in networksMeta #1476

merged 4 commits into from
Mar 7, 2023

Conversation

goosewobbler
Copy link
Contributor

No description provided.

// ensure chain exists in networksMeta
initial.main.networksMeta.ethereum[id] = initial.main.networksMeta.ethereum[id] || {}

const { nativeCurrency } = initial.main.networksMeta.ethereum[id]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this is quite right, it still throws an exception below when trying to reference an undefined nativeCurrency. I'm updating and adding a couple tests

Copy link
Contributor Author

@goosewobbler goosewobbler Mar 7, 2023

Choose a reason for hiding this comment

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

ok, could probably do with a test for the case where a chain has no networksMeta value too

Copy link
Collaborator

Choose a reason for hiding this comment

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

yep, there's one in there

Copy link
Contributor Author

@goosewobbler goosewobbler left a comment

Choose a reason for hiding this comment

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

Approved @mholtzman's changes

@mholtzman mholtzman merged commit ced11a3 into develop Mar 7, 2023
@mholtzman mholtzman deleted the ensure-migration branch March 7, 2023 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants