Skip to content

Conversation

blakecduncan
Copy link
Collaborator

@blakecduncan blakecduncan commented Apr 2, 2025

Pull Request Checklist


PR-Codex overview

This PR focuses on adding new blockchain configurations and enhancing the chain-switching logic in the application. It introduces two new chains, sonic and sonicTestnet, and modifies the setChain function to improve handling of chain switching based on the current wallet's chain ID.

Detailed summary

  • Added sonic and sonicTestnet chains in chains.ts.
  • Enhanced setChain function in setChain.ts:
    • Imported getChainId from @wagmi/core.
    • Implemented logic to check the current wallet's chain ID before switching chains.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Apr 2, 2025

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

Name Status Preview Comments Updated (UTC)
aa-sdk-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2025 1:29pm
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2025 1:29pm

Copy link
Contributor

graphite-app bot commented Apr 2, 2025

How to use the Graphite Merge Queue

Add the label graphite-merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

jakehobbs
jakehobbs previously approved these changes Apr 2, 2025
}

await switchChain(config._internal.wagmiConfig, { chainId: chain.id });
const chainId = getChainId(config._internal.wagmiConfig);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: i might prefer to name this something like wagmiChainId to avoid confusion

Copy link
Contributor

Choose a reason for hiding this comment

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

not blocking on this though, just a suggestion

@blakecduncan blakecduncan merged commit 76da7cb into main Apr 3, 2025
7 checks passed
@blakecduncan blakecduncan deleted the blake/set-chain branch April 3, 2025 16:15
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