[HUMAN App] fix: invalid sorting by reward_amount
#3201
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue tracking
Fixes #2679
Context behind the change
reward_amountis returned from exchange oracles asstringthat represents decimal. Even if we convert it to some big int - we will have to store it as string in Redis and then convert it back when responding to client, so taking into account there are no more use cases other than sort we simply pass a comparator function to pagination+sort util whenreward_amountproperty is desired as sort field.Also changed job discovery process to ensure that it always has all necessary fields before caching jobs in Redis.
How has this been tested?
Release plan
Just merge.
Potential risks; What to monitor; Rollback plan
No.