diff --git a/services/acct/api.go b/services/acct/api.go index 33d8628e..e5838ff8 100644 --- a/services/acct/api.go +++ b/services/acct/api.go @@ -98,6 +98,7 @@ func (api *PublicAccountManagerAPI) GetValidUTXOs(addr string, amount uint64) (i amount = math.MaxUint64 } ret.UTXOs, ret.Amount, err = api.a.GetUTXOs(addr, nil, &locked, &amount) + ret.Total = len(ret.UTXOs) return ret, err } diff --git a/services/acct/utils.go b/services/acct/utils.go index 1e95a123..f8d78903 100644 --- a/services/acct/utils.go +++ b/services/acct/utils.go @@ -17,7 +17,7 @@ type UTXOResult struct { type ValidUTXOsResult struct { Amount uint64 `json:"amount"` - Num int `json:"total"` + Total int `json:"total"` UTXOs []UTXOResult `json:"utxos,omitempty"` }