Skip to content

Commit 4be8822

Browse files
committed
fix: offset from paging
1 parent b8832b3 commit 4be8822

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/storage/clickhouse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,7 @@ func (c *ClickHouseConnector) GetTokenBalances(qf BalancesQueryFilter, fields ..
16041604

16051605
// Add limit clause
16061606
if qf.Page > 0 && qf.Limit > 0 {
1607-
offset := (qf.Page - 1) * qf.Limit
1607+
offset := qf.Page * qf.Limit
16081608
query += fmt.Sprintf(" LIMIT %d OFFSET %d", qf.Limit, offset)
16091609
} else if qf.Limit > 0 {
16101610
query += fmt.Sprintf(" LIMIT %d", qf.Limit)

0 commit comments

Comments
 (0)