refactor(abstract-utxo): delete unreachable utxolib explainPsbt path#8857
Draft
OttoAllmendinger wants to merge 4 commits into
Draft
refactor(abstract-utxo): delete unreachable utxolib explainPsbt path#8857OttoAllmendinger wants to merge 4 commits into
OttoAllmendinger wants to merge 4 commits into
Conversation
2c47e44 to
b70ae1c
Compare
b70ae1c to
2e0c4af
Compare
davidkaplanbitgo
previously approved these changes
May 26, 2026
2e0c4af to
c13035b
Compare
c13035b to
ac823d7
Compare
ac823d7 to
a7af158
Compare
…ckends Both properties were hardcoded constants (legacy: false, utxolib: false). Inline the values at the call site: drop the dead psbt-format guard, make the legacy-format path an unconditional throw, and replace the backend availability check with a direct utxolib comparison. Refs: T1-3245, T1-3280 Co-authored-by: llm-git <llm-git@ttll.de>
…e paths Delete signLegacyTransaction.ts and signPsbtUtxolib.ts entirely. Collapse decodePsbtWith (utxolib/wasm-utxo overloads) into a single decodePsbt. Remove UtxoTransaction/UtxoPsbt from DecodedTransaction, SdkBackend type and isSdkBackend guard, explainLegacyTx and its helpers, UtxoPsbt signing branches from signTransaction, and all decodeWith interface fields. Also fixes decodeTransaction to convert string input to buffer before the isPsbt check, so non-PSBT hex correctly throws ErrorDeprecatedTxFormat rather than a generic wasm deserialization error. Refs: T1-3245, T1-3280 Co-authored-by: llm-git <llm-git@ttll.de>
Use wasm-utxo's hasPsbtMagic and the local toTNumber helper in place of utxolib.bitgo.isPsbt and utxolib.bitgo.toTNumber in abstractUtxoCoin.ts and the fixed-script verifyTransaction path. Refs: T1-3279
The utxolib variant of explainPsbt is no longer called from any src file (transaction/explainTransaction.ts dispatches only to explainPsbtWasm). Delete it along with helpers that became dead, and migrate the few test callers to explainPsbtWasm. Refs: T1-3279
4b8b110 to
c011adb
Compare
c011adb to
f3ecc52
Compare
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
Removes dead and unreachable code in
modules/abstract-utxo/src/as a first step toward dropping@bitgo/utxo-libfrom the runtime. All changes are pure deletions or trivial mechanical replacements with no behaviour change.Changes, in order:
signLegacyTransaction.ts,signPsbtUtxolib.ts; removes branches already gated unreachableutxolib.bitgo.isPsbtwithhasPsbtMagic— direct one-liner replacement, no logic changeexplainPsbt.tsand associated branch in parsePsbtPR group context
Stack:
master → this PR → drop-fetchinputs → abstract-utxo-replacements → keychains-drop-utxolib → abstract-utxo-terminalTest plan
yarn tsc --noEmitclean inmodules/abstract-utxoyarn lintclean inmodules/abstract-utxo🤖 Generated with Claude Code