Skip to content

Conversation

@Jipperism
Copy link
Contributor

Added error handling for the public client creation process to prevent crashes when the wallet client is not properly initialized.

Added error handling for the public client creation process to prevent crashes when the wallet client is not properly initialized.
@vercel
Copy link

vercel bot commented Mar 27, 2025

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

Name Status Preview Comments Updated (UTC)
hypercerts-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2025 7:23pm

@Jipperism Jipperism self-assigned this Mar 27, 2025
@holkexyz holkexyz merged commit 63ef9fd into dev Mar 27, 2025
3 checks passed
@holkexyz holkexyz deleted the bugfix/error-message-rpc-invalid-chain-id branch March 27, 2025 19:25
const publicClient = walletClient?.chain.id
? EvmClientFactory.createClient(walletClient.chain.id)
: undefined;
let publicClient: PublicClient | undefined;
Copy link
Member

Choose a reason for hiding this comment

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

Personally I would try to have as little uninitialized variables in code as possible and just move this out to a function that returns PublicClient | undefined.

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.

[bug] error is showing up when connected to a chain that we don't support

4 participants