Skip to content

Commit

Permalink
clients/horizonclient: cursor and limit in ClaimableBalanceRequest te…
Browse files Browse the repository at this point in the history
…st update
  • Loading branch information
iateadonut committed Mar 4, 2022
1 parent 3d84568 commit dfb520f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions clients/horizonclient/claimable_balance_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,17 @@ func (cbr ClaimableBalanceRequest) BuildURL() (endpoint string, err error) {
if cbr.ID != "" {
endpoint = fmt.Sprintf("%s/%s", endpoint, cbr.ID)
} else {
params := map[string]string{
"claimant": cbr.Claimant,
"sponsor": cbr.Sponsor,
"asset": cbr.Asset,
"cursor": cbr.Cursor,
}
if (cbr.Limit) > 0 {
params["limit"] = strconv.FormatUint(uint64(cbr.Limit), 10)
}
queryParams := addQueryParams(
map[string]string{
"claimant": cbr.Claimant,
"sponsor": cbr.Sponsor,
"asset": cbr.Asset,
"limit": strconv.FormatUint(uint64(cbr.Limit), 10),
"cursor": cbr.Cursor,
},
params,
)
//cursor(tr.Cursor), limit(tr.Limit)

Expand Down

0 comments on commit dfb520f

Please sign in to comment.