[STACK psvytnwm] refactor(abstract-utxo): eliminate fetchInputs by reusing explainPsbtWasm inputAmount#8916
Draft
OttoAllmendinger wants to merge 1 commit into
Draft
Conversation
…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
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.
Summary
Stacks on
otto/abstract-utxo-foundation.Two related cleanups enabled by the dead-code removal in the parent PR:
fetchInputs.ts—getTxInputsandgetPsbtTxInputsare no longer called anywhere after the dead code removal in the parent PR. The file and its barrel export are deleted.verifyTransaction— theinputAmount - outputAmount < 0check infixedScript/verifyTransaction.tsis 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-terminalTest plan
yarn tsc --noEmitclean inmodules/abstract-utxoyarn lintclean inmodules/abstract-utxo🤖 Generated with Claude Code