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: Check if the wallet is connected and there's a current vault before showing toast #324

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

karelianpie
Copy link
Contributor

@karelianpie karelianpie commented Aug 13, 2023

Description

Check if the wallet is connected and there's a current vault before showing toast

The assertion currentVault?.chainID !== safeChainID was true because there wasn't a currentVault, then when we went into that condition, we were defaulting to Ethereum getNetwork(currentVault.chainID || 1) which was causing the toast in the issue.

Related Issue

Fixes #322

Motivation and Context

Show the warning correctly

How Has This Been Tested?

Locally, screenshot below

Screenshots (if appropriate):

Screenshot 2023-08-13 at 17 57 12

@karelianpie karelianpie self-assigned this Aug 13, 2023
@vercel
Copy link

vercel bot commented Aug 13, 2023

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

Name Status Preview Comments Updated (UTC)
yearnfi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 13, 2023 2:58pm

@saltyfacu
Copy link
Contributor

Nice! Thanks for the quick turnaround :)

@Majorfi Majorfi added this pull request to the merge queue Aug 14, 2023
Merged via the queue into main with commit 9b9f5c0 Aug 14, 2023
9 checks passed
@Majorfi Majorfi deleted the issues/322 branch August 14, 2023 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🟢 Done
Development

Successfully merging this pull request may close these issues.

Bug: when enter a url of a vault with my wallet disconnected, the chain warning is wrong
3 participants