Skip to content

refactor(abstract-utxo): replace redundant address test#8104

Merged
OttoAllmendinger merged 1 commit intomasterfrom
BTC-2650.rewrite-address-tests
Feb 11, 2026
Merged

refactor(abstract-utxo): replace redundant address test#8104
OttoAllmendinger merged 1 commit intomasterfrom
BTC-2650.rewrite-address-tests

Conversation

@OttoAllmendinger
Copy link
Contributor

Remove address generation, validation, format, and cross-coin compatibility
tests that are already covered in wasm-utxo:

  • fixedScript/address.ts: recreates addresses from wallet keys for all chain
    codes and networks, tests unsupported chain code errors (p2shP2wsh, p2wsh,
    p2tr, p2trMusig2 on legacy-only chains)
  • address/utxolibCompat.ts: script-to-address round-trips for all networks
    with fixture files covering p2sh, p2shP2wsh, p2wsh, p2tr, p2trMusig2,
    plus cashaddr variants for BCH/ecash
  • Rust tests in address/networks.rs: segwit, taproot, and legacy script
    support assertions per network
  • Rust tests in address/cashaddr.rs: cashaddr encoding, legacy-to-cashaddr
    translation, prefix and case handling

Replace with focused tests for assertFixedScriptWalletAddress, which is the
function abstract-utxo actually uses to validate addresses returned from the
backend. Delete the 20 addresses-by-chain.json fixture files that were only
used by the removed tests.

BTC-2650

Remove address generation, validation, format, and cross-coin compatibility
tests that are already covered in wasm-utxo:

- fixedScript/address.ts: recreates addresses from wallet keys for all chain
  codes and networks, tests unsupported chain code errors (p2shP2wsh, p2wsh,
  p2tr, p2trMusig2 on legacy-only chains)
- address/utxolibCompat.ts: script-to-address round-trips for all networks
  with fixture files covering p2sh, p2shP2wsh, p2wsh, p2tr, p2trMusig2,
  plus cashaddr variants for BCH/ecash
- Rust tests in address/networks.rs: segwit, taproot, and legacy script
  support assertions per network
- Rust tests in address/cashaddr.rs: cashaddr encoding, legacy-to-cashaddr
  translation, prefix and case handling

Replace with focused tests for assertFixedScriptWalletAddress, which is the
function abstract-utxo actually uses to validate addresses returned from the
backend. Delete the 20 addresses-by-chain.json fixture files that were only
used by the removed tests.

Co-authored-by: Cursor <cursoragent@cursor.com>

TICKET: BTC-2650
@OttoAllmendinger OttoAllmendinger marked this pull request as ready for review February 11, 2026 10:51
@OttoAllmendinger OttoAllmendinger requested a review from a team as a code owner February 11, 2026 10:51
@OttoAllmendinger OttoAllmendinger merged commit 2743446 into master Feb 11, 2026
20 checks passed
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.

2 participants