Skip to content

Commit

Permalink
Fix limit bug in subquery
Browse files Browse the repository at this point in the history
  • Loading branch information
urvisavla committed Sep 20, 2023
1 parent 0c76cdb commit fb28b78
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions services/horizon/internal/db2/history/claimable_balances.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,7 @@ func (q *Q) GetClaimableBalances(ctx context.Context, query ClaimableBalancesQue
// the claimant's address.

var selectClaimableBalanceClaimants = sq.Select("id").From("claimable_balance_claimants").
Where("destination = ?", query.Claimant.Address())

selectClaimableBalanceClaimants.Limit(query.PageQuery.Limit)
Where("destination = ?", query.Claimant.Address()).Limit(query.PageQuery.Limit)

subSql, err := applyClaimableBalancesQueriesCursor(selectClaimableBalanceClaimants, l, r, query.PageQuery.Order)
if err != nil {
Expand Down

0 comments on commit fb28b78

Please sign in to comment.