Skip to content

fix(console): use useChainPublicClient hook for all chain-specific reads#3948

Open
owenwahlgren wants to merge 1 commit intomasterfrom
fix/chat-large-message-handling
Open

fix(console): use useChainPublicClient hook for all chain-specific reads#3948
owenwahlgren wants to merge 1 commit intomasterfrom
fix/chat-large-message-handling

Conversation

@owenwahlgren
Copy link
Contributor

Summary

  • Migrate all 12 publicClient usages from useWalletStore() to the existing useChainPublicClient() hook across 11 toolbox components
  • The wallet store's publicClient is hardcoded to Fuji for non-Core wallets, causing waitForTransactionReceipt and readContract to poll the wrong RPC when targeting custom L1s
  • This is a higher-level fix that supersedes fix(console): use chain-specific publicClient for ICM tx receipts #3914 (which only fixed 2 of the 12 affected sites by duplicating the hook logic inline)

Affected components

File Usage fixed
TeleporterMessenger.tsx getBalance, getBytecode, waitForTransactionReceipt
TeleporterRegistry.tsx waitForTransactionReceipt
NativeMinter.tsx waitForTransactionReceipt
FeeManager.tsx waitForTransactionReceipt, readContract
RewardManager.tsx waitForTransactionReceipt, readContract
TransferProxyAdmin.tsx getStorageAt, readContract, waitForTransactionReceipt
MigrateV1ToV2.tsx waitForTransactionReceipt
DeployICMDemo.tsx getBytecode, waitForTransactionReceipt
MultisigOption.tsx readContract
AllowListComponents.tsx (×2) readContract, waitForTransactionReceipt
useERC20TokenStakingManager.ts estimateContractGas

Test plan

  • Deploy TeleporterMessenger on a custom L1 using Rabby/MetaMask — verify receipt resolves
  • Deploy TeleporterRegistry on a custom L1 using Rabby/MetaMask — verify receipt resolves
  • Mint native tokens on a custom L1 using non-Core wallet
  • Set fee config on a custom L1 using non-Core wallet
  • Verify all flows still work with Core wallet
  • Verify AllowList read/write operations work on custom L1s

Closes #3913
Supersedes #3914

Replace all 12 usages of walletStore.publicClient with the existing
useChainPublicClient() hook across 11 toolbox components. The store's
publicClient is hardcoded to Fuji for non-Core wallets, causing
waitForTransactionReceipt and readContract to poll the wrong RPC when
targeting custom L1s.
@vercel
Copy link

vercel bot commented Mar 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
builder-hub Ready Ready Preview, Comment Mar 9, 2026 8:22pm

Request Review

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.

fix(console): ICM contract deployments show infinite pending with non-Core wallets (Rabby, MetaMask)

1 participant