Route all non-governance txs through the cart with Multicall3 batching#70
Merged
Conversation
…71) * fix: throw instead of return on multicall pre-send failures Simulation and outcome-check failures inside the Multicall3 execution path called showAlert and returned. The dispatcher's executeAll loop treated the silent return as success, continued past the segment, and fired its terminal "All transactions executed successfully" toast — directly contradicting the error toast the user had just seen. Convert the four pre-send bailout paths to throw. For the two cases that fail after the cart has accepted entries (simulation, outcome check), mark every entry in the affected chunk as failed with the parsed reason before throwing so per-entry attribution survives in the cart panel. * fix: restore user-facing alerts on multicall pre-flight failures The prior commit converted four return paths to throws, but two of them ("Wallet client not ready" and "hasExecutingTx") dropped their showAlert calls. Because nothing higher up catches the thrown error, the user saw nothing — silent failure replaced the prior toast. Restore the alerts alongside the throw, matching the pattern already used for the simulation- and outcome-check branches. * fix: drop redundant showAlert calls — outer wrapper already emits toast `TransactionCartContext.executeAll` already wraps `executeAllTransactions()` in a try/catch that fires `showAlert("error", error.message)` on any rejection. The showAlert calls added in the prior commit were therefore duplicating the wrapper's toast (and in the `hasExecutingTx` branch, the two toasts even disagreed on type — info vs. error). Remove the local showAlert at every site that now throws. Keep: - the throws themselves (still required to abort `executeAll` and prevent the false-success toast), - the `setTransactions(failed)` blocks in the simulation / outcome-check branches (they add per-entry attribution the wrapper can't reconstruct), - the chunk-count info toast above the chunk loop (legitimate, not duplicated by the wrapper). `error.message` carries the chunk-labelled reason verbatim, so the toast the user sees is identical to what the local showAlert was emitting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #37