Skip to content

[STACK psvytnwm] refactor(abstract-utxo): eliminate fetchInputs by reusing explainPsbtWasm inputAmount#8916

Draft
OttoAllmendinger wants to merge 1 commit into
otto/abstract-utxo-foundationfrom
otto/drop-fetchinputs
Draft

[STACK psvytnwm] refactor(abstract-utxo): eliminate fetchInputs by reusing explainPsbtWasm inputAmount#8916
OttoAllmendinger wants to merge 1 commit into
otto/abstract-utxo-foundationfrom
otto/drop-fetchinputs

Conversation

@OttoAllmendinger
Copy link
Copy Markdown
Contributor

Summary

Stacks on otto/abstract-utxo-foundation.

Two related cleanups enabled by the dead-code removal in the parent PR:

  1. Delete fetchInputs.tsgetTxInputs and getPsbtTxInputs are no longer called anywhere after the dead code removal in the parent PR. The file and its barrel export are deleted.
  2. Remove fee guard from verifyTransaction — the inputAmount - outputAmount < 0 check in fixedScript/verifyTransaction.ts is a holdover from legacy transaction handling. The PSBT path has its own input verification; this guard is unreachable dead code.

PR group context

Stack: master → abstract-utxo-foundation → this PR → abstract-utxo-replacements → keychains-drop-utxolib → abstract-utxo-terminal

Test plan

  • yarn tsc --noEmit clean in modules/abstract-utxo
  • yarn lint clean in modules/abstract-utxo
  • All abstract-utxo unit tests pass

🤖 Generated with Claude Code

…Wasm inputAmount

The legacy getTxInputs branch is unreachable (decodeTransaction throws
ErrorDeprecatedTxFormat for non-PSBT input), and getPsbtTxInputs's only
remaining caller in verifyTransaction just sums input values to check
fee >= 0. explainPsbtWasm already returns inputAmount, so reuse that
and delete fetchInputs.ts entirely.

Refs: T1-3279
@OttoAllmendinger OttoAllmendinger requested a review from a team as a code owner June 2, 2026 08:51
@OttoAllmendinger OttoAllmendinger marked this pull request as draft June 2, 2026 08:57
@OttoAllmendinger OttoAllmendinger changed the title refactor(abstract-utxo): eliminate fetchInputs and remove fee guard [STACK psvytnwm] refactor(abstract-utxo): eliminate fetchInputs by reusing explainPsbtWasm inputAmount Jun 2, 2026
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.

1 participant