You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(propdates): drop re-added pre-simulate + restore friendly errors (#66)
* fix(propdates): drop re-added pre-simulate + restore friendly errors
Thirdweb migration (#59) regressed c85d633 by re-adding the
publicClient.simulateContract pre-flight call. Browser eth_call is
blocked in CORS-strict, adblock-heavy, and Farcaster miniapp
sandbox environments, so the pre-simulate throws "Failed to fetch"
before the wallet ever gets a chance to sign. Wallet simulates
internally, so the pre-flight is redundant.
Also restore the error-message parser so users see the same
"Network error reaching Base RPC..." / "Transaction rejected in
wallet." toasts as before the migration instead of raw multi-line
viem reverts.
Closes#65
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(thirdweb-tx): verify chain after switchChain
Zerion (and some other wallets) resolve wallet_switchEthereumChain
without actually moving the provider, which caused propdate txs to
broadcast on Ethereum mainnet even though the UI thought we were on
Base. Verify getChain() after the switch and throw a clear
"switch network manually" error so callers toast before signing.
Benefits every write path (delegate, vote, bid, settle, POIDH,
droposals, lootbox, propdates, splits).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(writes): switch chain on admin wallet, not SA wrapper
Chain switching targeted the wrong wallet whenever a user signed in
"view as EOA" mode on an AA-wrapped session:
- THIRDWEB_AA_CONFIG pins the SA wrapper to Base, so
useActiveWallet().getChain().id === 8453 always returns true.
- ensureOnChain on that wrapper is a noop — switchChain never fires.
- The admin wallet (the external Zerion/MetaMask provider that
actually signs EOA transactions) stays on its current chain.
- sendTransaction then broadcasts on whatever chain the admin
provider has selected — Ethereum mainnet in the reported case.
Fix: useWriteAccount now returns the admin wallet when isEoaSigner,
so ensureOnChain operates on the provider that actually matters.
useEoaDelegate is updated the same way. Auction bid/settle and
propdates no longer pass the raw useActiveWallet() — they use
writer.wallet consistently.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments