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

fix: don't crash when there is a new network in lists state #3589

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

shoom3301
Copy link
Collaborator

Summary

Context: https://cowservices.slack.com/archives/C0361CDG8GP/p1704724619995319

Since listsStatesByChainAtom is persisted in localStorage, when we add a new network it wouldn't be in the state due to cached value in localStorage.

For this case we must consider a value from state as undefined.

To Test

  1. Fill a localStorage state from prod to domain with Sepolia
  2. App should not crash

@shoom3301 shoom3301 requested a review from a team January 9, 2024 07:14
@shoom3301 shoom3301 self-assigned this Jan 9, 2024
Copy link

vercel bot commented Jan 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
cosmos ✅ Ready (Inspect) Visit Preview Jan 9, 2024 11:23am
explorer ❌ Failed (Inspect) Jan 9, 2024 11:23am
swap-dev ✅ Ready (Inspect) Visit Preview Jan 9, 2024 11:23am
widget-configurator ✅ Ready (Inspect) Visit Preview Jan 9, 2024 11:23am

@elena-zh
Copy link
Contributor

elena-zh commented Jan 9, 2024

Looks like not fixed :(
image

@alfetopito alfetopito deleted the fix/lists-state branch January 9, 2024 16:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants