Repository navigation
v2.2.0
Minor Changes
-
#735
223acddThanks @kome12! -trade execute: non-gasless swaps now broadcast through the execution route that tracks the on-chain outcome server-side, instead of the deprecated/executeroute. SetNANSEN_TRADING_EXECUTION_ROUTE=legacyto go back to the old route; any value other thanstandardorlegacyis rejected rather than silently falling back.Three behaviours change for swaps that previously succeeded, so they are worth knowing before you upgrade:
- A failed swap no longer falls through to the next candidate quote. The command stops and reports the failure. Once a transaction hash exists the backend keeps the quote claimed, so the next candidate could only have been rejected anyway — but a command that used to retry silently now surfaces an error and expects you to request a fresh quote.
- A duplicate submission of a quote that is already in flight is refused, rather than broadcast a second time.
- A quote carrying no backend quote id is refused outright (
MISSING_QUOTE_ID), because that id is the key the route's duplicate-submission lock is held on, and broadcasting without it would claim a protection that is not there. Every live/quoteresponse carries one, so this means a stale or hand-edited quote file: request a fresh quote. This includes a quote that carries only an aggregator's own quote id: the deprecated route accepted that and sent it, but it does not key the lock, so the standard route refuses it rather than submit unprotected.
On this route the command opts into the server-side pre-broadcast simulation, which the endpoint leaves off by default, so a transaction that would revert still does not reach the network. It also surfaces the aggregator's own revert reason alongside the backend's failure code, fails closed if the endpoint reports success without a transaction hash or returns a body that is not this route's shape, and reports a node-rejected broadcast on Solana as an unverified outcome rather than a successful swap (the EVM path resolves that case by polling for a receipt; Solana has no such poll). The
Broadcaster:line is no longer printed, because this route does not report one.Two paths deliberately do not move:
- Gasless swaps stay on the deprecated route. The standard route has no gasless envelope, so a signed Relay authorization sent there would lose its framing and submit as a plain swap.
- A WalletConnect wallet broadcasts the swap itself and never reaches this endpoint. The command now says so, and applies the same stop-at-a-failed-swap rule there — both when the transaction reverts and when the wallet returns no hash at all — rather than prompting for the next candidate.
Approval and allowance-revoke broadcasts also continue to use the deprecated route; it is swaps that moved.
Patch Changes
-
#736
3f59ed8Thanks @kome12! -trade execute: treat every/executeresponse this client cannot interpret as an ambiguous broadcast instead of a pre-broadcast rejection. HTTP status alone — including 400, 408, 409 and 429 — no longer claims the backend rejected the transaction before broadcast, a 2xx body that is unreadable or carries no documentedSuccess/Failedstatus now fails closed, and a success response must carry a usable transaction identifier on Solana and on gasless EVM. Previously these shapes let the candidate loop sign and broadcast the next quote on top of a transaction that may already be live.A success or failure response carrying a malformed identifier — an object, a non-string, a non-base58 Solana signature, or a hash that is not 32 bytes of hex — is also refused, instead of reaching the explorer URL, the stored broadcast marker and receipt polling as a value that identifies nothing. EVM paths no longer read Solana's
signaturefield at all. -
#740
5e23501Thanks @kome12! -trade execute: keep a quote claimed whenever a transaction may have left this process, and stop rather than falling through to the next candidate. An application-level failure that still carries a transaction identifier is now terminal and records that hash, approval and allowance-revoke broadcasts retain the claim so a quote cannot be reused while the wallet's allowance state is unknown, and a post-broadcast allowance verification failure ends the command instead of swapping against an allowance of unknown value. A candidate that throws after the swap was handed off is treated as ambiguous and marks the quote spent. Conversely, a backend failure response carrying no transaction identifier now releases the local claim, so a quote that was never broadcast is not left unusable. -
#737
4361d95Thanks @kome12! -trade execute: a confirmed on-chain revert now ends the command instead of signing and broadcasting the next candidate quote. The revert is reported with its hash and explorer link as before, and the user is told to review that transaction and request a fresh quote.waitForReceipttags the failureTX_REVERTEDrather than relying on the error message text. -
#739
fe3e63fThanks @kome12! -trade execute: a WalletConnect send that fails after the wallet was asked to broadcast now ends the command instead of trying the next candidate quote. The WalletConnect helpers collapse a user rejection, a 120-second approval timeout and a spawn failure into the same error, so none of them proves the wallet did not broadcast; every send is now tagged ambiguous at that boundary and treated as terminal. This covers the swap, approval, allowance-revoke and Solana paths, and a wallet reply carrying neither a transaction hash nor signed bytes.