Skip to content

fix: use address UTXO endpoint - #2

Open
manuelsampedro1 wants to merge 1 commit into
BitgesellOfficial:mainfrom
manuelsampedro1:codex/go-toolkit-address-utxo-endpoint
Open

fix: use address UTXO endpoint#2
manuelsampedro1 wants to merge 1 commit into
BitgesellOfficial:mainfrom
manuelsampedro1:codex/go-toolkit-address-utxo-endpoint

Conversation

@manuelsampedro1

Copy link
Copy Markdown

GetAddressUTXO currently calls the unconfirmed transactions endpoint, so callers requesting UTXOs receive transaction-history data instead of the address UTXO response.

Changes:

  • route GetAddressUTXO to /address/utxo/{address}
  • update the unit test mock path so the regression is covered

Cross-checks:

  • the wallet client in this org already uses /address/utxo/{address} for UTXOs
  • bglapiserver exposes the address UTXO route separately from unconfirmed transactions

Validation:

  • static endpoint cross-check with rg across the toolkit, wallet client, and bglapiserver route usage

Note: I could not run go test ./... in this local environment because the Go toolchain is not installed here.

Bounty context: BitgesellOfficial/bitgesell#39

@MyTH-zyxeon

Copy link
Copy Markdown

Review-assist note for the Bitgesell #81 improvement lane.

I checked the public PR metadata and diff. This is a focused Go SDK endpoint fix:

  • changes GetAddressUTXO from the unconfirmed-transaction endpoint to address/utxo/{address}
  • updates the matching unit-test mock route so the test exercises the intended UTXO URL
  • keeps the change to Address.go and Address_test.go, with no wallet, signing, RPC credential, or live-chain behavior in this review note

Suggested maintainer checks before merge:

  • confirm address/utxo/{address} is the canonical current bglapi route for spendable UTXOs
  • add or verify response-shape coverage if AddressUTXOs expects fields that differ from the previous unconfirmed-transaction payload
  • run the Go test suite with the mocked endpoint path and, if available, one non-secret dry-run against a local/dev bglapi fixture
  • check whether any README or example code still documents the old unconfirmed endpoint for GetAddressUTXO

From the public patch shape, this looks like a useful low-risk SDK correctness candidate for the #81 improvement queue. I did not run Go tests, connect to a node, use wallet keys, submit payment details, or perform any live-chain action for this review-assist note.

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