feat(abstract-utxo): replace utxo-lib with wasm-utxo in tests#8107
Merged
OttoAllmendinger merged 3 commits intomasterfrom Feb 11, 2026
Merged
feat(abstract-utxo): replace utxo-lib with wasm-utxo in tests#8107OttoAllmendinger merged 3 commits intomasterfrom
OttoAllmendinger merged 3 commits intomasterfrom
Conversation
df559db to
9845e73
Compare
Port Bitcoin test implementation to use wasm-utxo library instead of utxo-lib. This includes implementing utility functions to create PSBTs and maintaining the same test behavior with the new implementation. Issue: BTC-2650 Co-authored-by: llm-git <llm-git@ttll.de>
Consolidate test fixtures and refactor unit tests for better organization. Move address validation tests to their own file, reorganize BTC backup key fixtures and audit tests, and consolidate spoofing protection tests. Issue: BTC-2650 Co-authored-by: llm-git <llm-git@ttll.de>
- util/address.ts: Extract getWalletAddress helper from psbt.ts for
generating addresses from RootWalletKeys, enabling dynamic address
generation in tests instead of hardcoded values
- util/nockBitGo.ts: Add nockWalletKeys helper to encapsulate the
repeated pattern of mocking wallet key fetch endpoints, reducing
10+ lines of boilerplate per test to a single function call
- util/index.ts: Export nockBitGo and address utilities so they're
accessible from the central util import
- postProcessPrebuild.ts: Use getUtxoCoin('tbtc') instead of manual
TestBitGo setup, and generate output address dynamically instead
of hardcoding
- testSpoofTransaction.ts: Replace hardcoded addresses with dynamically
generated ones using wallet keys vs attacker keys, making the test
intent clearer. Use nockBitGo() and nockWalletKeys() to eliminate
URL extraction and key mocking boilerplate
Co-authored-by: Cursor <cursoragent@cursor.com>
TICKET: BTC-2650
9845e73 to
2b6aa37
Compare
davidkaplanbitgo
approved these changes
Feb 11, 2026
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.
This PR replaces utxo-lib with wasm-utxo in the abstract-utxo package
tests and includes significant refactoring to improve test organization
and reduce boilerplate.
Changes
getWalletAddresshelper for generating addresses fromRootWalletKeysnockWalletKeyshelper to reduce mocking boilerplateBTC-2650