Skip to content

feat(transactions): add reconstructEncodedTransactionFromOriginalTransaction to transactions package#1475

Open
dpsi9 wants to merge 3 commits intoanza-xyz:mainfrom
dpsi9:transactions-reconstruct-encoded-transaction
Open

feat(transactions): add reconstructEncodedTransactionFromOriginalTransaction to transactions package#1475
dpsi9 wants to merge 3 commits intoanza-xyz:mainfrom
dpsi9:transactions-reconstruct-encoded-transaction

Conversation

@dpsi9
Copy link
Copy Markdown
Contributor

@dpsi9 dpsi9 commented Mar 15, 2026

Problem

The logic to determine the correct lifetime (blockhash vs durable nonce) previously existed only inside the React useWalletAccountTransactionSigner hook and was not reusable.

Summary of Changes

  • add reconstructEncodedTransactionFromOriginalTransaction to the transactions package
  • export the helper via the transactions package index
  • refactor useWalletAccountTransactionSigner to use the helper
  • add unit tests and typetests for the reconstructEncodedTransactionFromOriginalTransaction function
  • update useWalletAccountTransactionSigner tests accordingly

Fixes #1466

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 15, 2026

⚠️ No Changeset found

Latest commit: 0f39a4f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@lorisleiva
Copy link
Copy Markdown
Member

Hi there, just having a quick first look at this PR and whilst the code extraction is trivial, the tests don't seem at all consistent with the rest of the code base. For instance, if you look at the typetests, you'll see patterns that we just don't use anywhere in the repo (e.g. X extends Y ? true : false and asserting on that instead of just relying on satisfies). I believe the regular tests can also be refactored to be easier to read and more consistent with the rest of the codebase.

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.

Add a function to help TransactionModifyingSigner update lifetimeConstraint

2 participants