Salar Saeedi

Product management · Analysis

Which checkout quote survives a wallet switch?

An account or network change can invalidate a wallet quote. Bind estimates to their context and refresh before signing.

Salar Saeedi2 min read
Three-stage illustration — Which checkout quote survives a wallet switch?

A user builds a quote, opens the wallet and switches accounts. The browser still shows the original estimate. That stale state can survive ordinary UI testing because the transaction preview remains visually identical.

Bind the quote to its assumptions

Store the chain, sender, asset, destination and source of fees with the quote. EIP-1193 defines events for account and chain changes that an interface can observe. Clear the current confirmation when the new context invalidates those assumptions.

Source · Ethereum · EIP-1193 provider API

Say what needs attention

If only the account changes, explain that balances, allowances or eligibility may differ. If the network changes, show the accepted network and a way to return to it. Preserve the entered purchase details and refresh just the parts that depend on the wallet.

Re-run checks after a material change

Run a fresh calculation and, when applicable, simulate for the active account. A simulator’s result relates to the inputs and state it used. Test a switch while quoting and another while the wallet prompt is visible.

Source · viem · simulateContract

What to take away

A release is ready when the signed action can be traced to the version of the quote the user actually confirmed.

References

Related work in the portfolio