Skip to content

Fiddle: add useOnSwitchToWeb3ChainIdClicked to Web3AccountContext#11

Merged
krishan711 merged 5 commits into
mainfrom
fixwall2
Jul 22, 2025
Merged

Fiddle: add useOnSwitchToWeb3ChainIdClicked to Web3AccountContext#11
krishan711 merged 5 commits into
mainfrom
fixwall2

Conversation

@krishan711
Copy link
Copy Markdown
Contributor

Description

Screenshots:

Checklist:

  • I have updated the CHANGELOG with a summary of my changes
  • I have updated the documentation accordingly

@krishan711 krishan711 requested a review from Copilot July 22, 2025 20:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds chain switching functionality to the Web3AccountContext by implementing a new hook useOnSwitchToWeb3ChainIdClicked and associated chain switching logic. The changes improve type safety by removing TypeScript ignore comments and adding proper Window interface declarations.

  • Adds onSwitchToChainIdClicked method to handle chain switching with fallback to adding new chains
  • Introduces useOnSwitchToWeb3ChainIdClicked hook to expose chain switching functionality to consumers
  • Improves TypeScript integration by declaring the global Window interface and removing @ts-expect-error comments

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/Web3AccountContext.tsx Adds chain switching functionality, improves type safety, and exports new hook
CHANGELOG.md Documents the new features added in this release

Comment thread src/Web3AccountContext.tsx Outdated
Comment thread src/Web3AccountContext.tsx Outdated
Comment thread src/Web3AccountContext.tsx Outdated
krishan711 and others added 3 commits July 22, 2025 21:18
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@krishan711 krishan711 merged commit 6d30f7c into main Jul 22, 2025
3 checks passed
@krishan711 krishan711 deleted the fixwall2 branch July 22, 2025 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants