Skip to content

Fix address UTXO endpoint - #6

Open
MiguelKorTes wants to merge 1 commit into
BitgesellOfficial:mainfrom
MiguelKorTes:fix-address-utxo-endpoint
Open

Fix address UTXO endpoint#6
MiguelKorTes wants to merge 1 commit into
BitgesellOfficial:mainfrom
MiguelKorTes:fix-address-utxo-endpoint

Conversation

@MiguelKorTes

Copy link
Copy Markdown

Summary

  • Fix getAddressUTXO() to call the confirmed address UTXO endpoint: /address/utxo/{address}
  • Remove describe.only from the address wrapper tests so the full suite is not accidentally focused on one file
  • Add a mocked regression test for the generated UTXO URL

Verification

  • npm run build
  • npm test -- --runTestsByPath src/tests/address-url.test.ts --coverage=false

Note: submitted for the Bitgesell bounty/improvement program referenced in BitgesellOfficial/bitgesell#39 and BitgesellOfficial/bitgesell#81. Payout details can be provided after review/approval.

@MyTH-zyxeon

Copy link
Copy Markdown

Maintainers - this looks like a narrow, reviewer-friendly Bitgesell improvement slice.

What seems immediately valuable here:

  • getAddressUTXO() now targets /address/utxo/{address}, which matches the method name much better than the old unconfirmed-transactions path.
  • The added mocked URL regression test makes the endpoint contract explicit, instead of relying on a live API call.
  • Removing describe.only is important here because otherwise the new regression test could pass while the rest of the address test surface is silently skipped.

Suggested acceptance checks:

  1. getAddressUTXO(address) now always hits the confirmed UTXO endpoint and returns the same response shape the SDK docs/types expect.
  2. The full address test suite still runs after dropping describe.only, not just the new focused URL test.
  3. If the old unconfirmed-transactions behavior is still needed anywhere, it should stay as a separate method rather than overloading getAddressUTXO() with ambiguous semantics.

From a reviewability standpoint, this is a good small PR: one endpoint correction, one guardrail test, one test-harness cleanup.

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