Pass mutable context to executeTransactionMessage callback#1302
Conversation
🦋 Changeset detectedLatest commit: 627e15e The changes in this PR will be included in the next version bump. This PR includes changesets to release 43 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
BundleMonFiles updated (4)
Unchanged files (132)
Total files change +257B +0.06% Final result: ✅ View report in BundleMon website ➡️ |
c48ad05 to
40e12fa
Compare
3f4dec2 to
1ad403f
Compare
|
Documentation Preview: https://kit-docs-18shpvjzx-anza-tech.vercel.app |
|
Oh I guess I need to update some examples on that one as well. Will do that asap. EDIT: Done ✅ |
7262be7 to
d8aa88e
Compare
40e12fa to
3ceef93
Compare
planType to distinguish between InstructionPlan, TransactionPlan and TransactionPlanResult
#1309
mcintyre94
left a comment
There was a problem hiding this comment.
Nice, great tests and typetests too! I think this is a really nice way to structure executors now.
Merge activity
|
3ceef93 to
5c810ac
Compare
d8aa88e to
627e15e
Compare
|
Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up. |

Problem
The
executeTransactionMessagecallback returns its result and context as a single object, which means none of that information is available when the callback throws. If an error occurs after signing but before confirming, for example, the transaction and signature are lost — making it difficult to debug failures or build recovery plans.Summary of Changes
The
executeTransactionMessagecallback now receives a mutable context object as its first argument. This context can be incrementally populated during execution (e.g. with the latest transaction message, the compiled transaction, or custom properties) and is preserved in the resultingSingleTransactionPlanResultregardless of the outcome — including failures.The callback signature changes from
(message, config)to(context, message, config)and now returns aSignature | Transactiondirectly instead of wrapping the result in an object. Custom context is set via mutation on the context argument rather than being returned.Relates to #1273