Skip to content

Commit

Permalink
Proper sorting by account in holders pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie-wasp committed Apr 15, 2019
1 parent 79a4ed3 commit 94f7135
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/repo/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ export default class AssetsRepo {
.toString()
.split("_");

queryBuilder.where("accountid != ?", accountId);

if (paging.after) {
// <= and >= allow to handle zero balances
queryBuilder.where("balance <= ?", balance);
} else {
queryBuilder.where("accountid >= ?", accountId);
} else if (paging.before) {
queryBuilder.where("balance >= ?", balance);
queryBuilder.where("accountid <= ?", accountId);
}
}

Expand Down

0 comments on commit 94f7135

Please sign in to comment.