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: use wallet_addEthereumChain if cannot switch chain #3563

Merged
merged 2 commits into from
Apr 16, 2024
Merged

Conversation

katspaugh
Copy link
Member

What it solves

Resolves #3515

How this PR fixes it

If wallet_switchEthereumChain throughs an "Unrecognized chain" error, we'll attempt to add that chain to the wallet.

Copy link

github-actions bot commented Apr 16, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link

github-actions bot commented Apr 16, 2024

📦 Next.js Bundle Analysis for safe-wallet-web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 1006.13 KB (🟡 +184 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Copy link

github-actions bot commented Apr 16, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
79.07% (-0.04% 🔻)
11215/14184
🔴 Branches
58.55% (-0.01% 🔻)
2653/4531
🟡 Functions
66.07% (-0.02% 🔻)
1807/2735
🟢 Lines
80.34% (-0.05% 🔻)
10104/12577
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / sdk.ts
70.97% (-6.41% 🔻)
42.11% (-2.34% 🔻)
69.23% (-5.77% 🔻)
69.88% (-7.15% 🔻)

Test suite run success

1419 tests passing in 198 suites.

Report generated by 🧪jest coverage report action from a9c8e84

src/services/tx/tx-sender/sdk.ts Show resolved Hide resolved
src/services/tx/tx-sender/sdk.ts Outdated Show resolved Hide resolved
src/services/tx/tx-sender/sdk.ts Show resolved Hide resolved
@francovenica
Copy link
Contributor

LGTM

Tested with Cello that was the network that gave me troubles on the first place
Deleted a few networks from the MM extension and add them again by switching to them

@katspaugh katspaugh merged commit 1e55bc8 into dev Apr 16, 2024
14 checks passed
@katspaugh katspaugh deleted the switch-chain branch April 16, 2024 17:33
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2024
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.

MetaMask connection: unable to switch to the network, that isn't added in to current wallet
3 participants