Skip to content

ensure chain exists in networksMeta#1476

Merged
mholtzman merged 4 commits intodevelopfrom
ensure-migration
Mar 7, 2023
Merged

ensure chain exists in networksMeta#1476
mholtzman merged 4 commits intodevelopfrom
ensure-migration

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