Skip to content

feat(transaction-controller): snapshot txParamsOriginal when container types are applied#8546

Merged
matthewwalsh0 merged 1 commit intomainfrom
feat/snapshot-tx-params-original-on-container-set
Apr 24, 2026
Merged

feat(transaction-controller): snapshot txParamsOriginal when container types are applied#8546
matthewwalsh0 merged 1 commit intomainfrom
feat/snapshot-tx-params-original-on-container-set

Conversation

@matthewwalsh0
Copy link
Copy Markdown
Member

@matthewwalsh0 matthewwalsh0 commented Apr 22, 2026

Explanation

Snapshot txParamsOriginal in updateEditableParams when containerTypes are first applied, so consumers have a reference to the pre-wrap transaction parameters.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

Note

Low Risk
Low risk: adds a guarded metadata snapshot when containerTypes are first set, with tests covering non-application and non-overwrite cases.

Overview
When updateEditableParams applies containerTypes for the first time, it now snapshots the pre-wrap txParams into txParamsOriginal (without overwriting an existing snapshot).

Adds unit tests covering snapshot creation only on first wrap, no snapshot when containerTypes isn’t provided or already set, and preserving an existing txParamsOriginal; updates the changelog accordingly.

Reviewed by Cursor Bugbot for commit 2198ab0. Bugbot is set up for automated code reviews on this repo. Configure here.

@matthewwalsh0 matthewwalsh0 force-pushed the feat/snapshot-tx-params-original-on-container-set branch 2 times, most recently from c0b9ec0 to dc75363 Compare April 23, 2026 15:07
…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.
@matthewwalsh0 matthewwalsh0 force-pushed the feat/snapshot-tx-params-original-on-container-set branch from dc75363 to 2198ab0 Compare April 23, 2026 16:01
@matthewwalsh0 matthewwalsh0 marked this pull request as ready for review April 23, 2026 19:39
@matthewwalsh0 matthewwalsh0 requested review from a team as code owners April 23, 2026 19:39
@matthewwalsh0 matthewwalsh0 enabled auto-merge April 24, 2026 11:10
@matthewwalsh0 matthewwalsh0 added this pull request to the merge queue Apr 24, 2026
Merged via the queue into main with commit 6a2a673 Apr 24, 2026
653 of 711 checks passed
@matthewwalsh0 matthewwalsh0 deleted the feat/snapshot-tx-params-original-on-container-set branch April 24, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants