Skip to content

Commit

Permalink
btc: fix incorrect index being used
Browse files Browse the repository at this point in the history
  • Loading branch information
guggero committed Jul 12, 2024
1 parent e5c1307 commit 133cf7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions btc/explorer_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ func (a *ExplorerAPI) Unspent(addr string) ([]*Vout, error) {
// Now filter those that are really unspent, because above we get all
// outputs that are sent to the address.
var unspent []*Vout
for idx, vout := range outputs {
for _, vout := range outputs {
url := fmt.Sprintf(
"%s/tx/%s/outspend/%d", a.BaseURL, vout.Outspend.Txid,
idx,
vout.Outspend.Vin,
)
outspend := Outspend{}
err := fetchJSON(url, &outspend)
Expand Down

0 comments on commit 133cf7b

Please sign in to comment.