feat(transaction-controller): snapshot txParamsOriginal when container types are applied#8546
Merged
matthewwalsh0 merged 1 commit intomainfrom Apr 24, 2026
Conversation
c0b9ec0 to
dc75363
Compare
…r types are applied When updateEditableParams is called with containerTypes transitioning from empty to non-empty, capture the pre-update txParams as txParamsOriginal so consumers can restore or display the original transaction values (e.g. recipient, value) before a wrapping container (such as EnforcedSimulations) rewrote them. Only snapshots when txParamsOriginal is not already set, preserving any earlier snapshot taken elsewhere.
dc75363 to
2198ab0
Compare
OGPoyraz
approved these changes
Apr 24, 2026
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.
Explanation
Snapshot
txParamsOriginalinupdateEditableParamswhencontainerTypesare first applied, so consumers have a reference to the pre-wrap transaction parameters.References
Checklist
Note
Low Risk
Low risk: adds a guarded metadata snapshot when
containerTypesare first set, with tests covering non-application and non-overwrite cases.Overview
When
updateEditableParamsappliescontainerTypesfor the first time, it now snapshots the pre-wraptxParamsintotxParamsOriginal(without overwriting an existing snapshot).Adds unit tests covering snapshot creation only on first wrap, no snapshot when
containerTypesisn’t provided or already set, and preserving an existingtxParamsOriginal; updates the changelog accordingly.Reviewed by Cursor Bugbot for commit 2198ab0. Bugbot is set up for automated code reviews on this repo. Configure here.