Skip to content

Conversation

@matthewwalsh0
Copy link
Member

Explanation

The existing TransactionController:updateTransaction method and its messenger action require passing a full TransactionMeta object, which can be inefficient for partial updates and does not return the updated transaction.

This PR introduces a new public updateTransaction overload that accepts an object { transactionId, callback }. This allows for more granular and atomic updates to a transaction's properties via a callback function, and the method now returns the updated Readonly<TransactionMeta>.

A new messenger action, TransactionController:updateTransactionObj, has been added to expose this new, more flexible update mechanism. The original updateTransaction(transactionMeta, note) signature and its associated messenger action type (TransactionControllerUpdateTransactionAction) have been deprecated to encourage migration to the new approach.

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 communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Open in Cursor Open in Web

…lback

Add a new public updateTransaction overload that accepts an object with
transactionId and callback properties, allowing transactions to be
updated using a callback function.

Changes:
- Add UpdateTransactionRequest type for the new overload parameters
- Add updateTransaction overload that takes { transactionId, callback }
- Mark the original updateTransaction(transactionMeta, note) as deprecated
- Add new TransactionController:updateTransactionObj messenger action
- Add TransactionControllerUpdateTransactionObjAction type
- Add tests for the new updateTransactionObj messenger action
- Export new types from index.ts

Co-authored-by: matthew.walsh <[email protected]>
@cursor
Copy link

cursor bot commented Jan 30, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

- Fix Prettier formatting for handler type definition
- Add explicit return undefined for consistent-return rule

Co-authored-by: matthew.walsh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants