Treat wallet error 4001 as a user decision
Handle EIP-1193 rejection as a cancelled wallet action and keep earlier confirmed steps intact.
Explore the reference
Handle precision, validation, reliability and the operating details behind a swap interface.
69 guides · Page 4 of 4
Handle EIP-1193 rejection as a cancelled wallet action and keep earlier confirmed steps intact.
Temporarily pause new requests to a failing quote service while keeping pending trade reconciliation available.
Roll out a browser content security policy around swap scripts, network connections and embedded frames without treating it as transaction validation.
Pin chain state and preserve the original transaction context when reproducing a swap failure on a fork.
Add runtime validation at the provider boundary so malformed or newly changed response shapes cannot reach wallet execution.
Parse swap deep links as untrusted form suggestions and validate chain, tokens, amount and recipient before use.
Treat sender, signer and output recipient as separate roles, and reject unsupported recipient combinations before quoting.
Validate the signing domain and trade message before handing EIP-712 typed data to a wallet.
Choose cache keys and freshness rules separately for indicative prices, executable quotes and account-specific validation.