Commit f7f74cd
authored
fix: offset from paging (#185)
### TL;DR
Fixed pagination offset calculation in token balances query.
### What changed?
Modified the offset calculation in the `GetTokenBalances` method to use `qf.Page * qf.Limit` instead of `(qf.Page - 1) * qf.Limit`. This changes how pagination works when retrieving token balances from the ClickHouse database.
### How to test?
1. Query token balances with pagination parameters (page > 0, limit > 0)
2. Verify that the correct records are returned for each page
3. Check that there is no overlap or gap between consecutive pages
### Why make this change?
The previous calculation assumed page numbers started at 1, but params in insight-service use pages starting with `0`. This fix ensures that the correct offset is calculated when paginating through token balances, preventing duplicate records or skipped entries when navigating through pages.1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1604 | 1604 | | |
1605 | 1605 | | |
1606 | 1606 | | |
1607 | | - | |
| 1607 | + | |
1608 | 1608 | | |
1609 | 1609 | | |
1610 | 1610 | | |
| |||
0 commit comments