jurteam / platform

Jur Beta Platform
https://beta.jur.io
0 stars 0 forks source link

FIX sorting not working properly in ordering Oaths #317

Closed 0xlyd closed 4 years ago

0xlyd commented 4 years ago

Expected Behavior

The sort by Amount Staked to show bigger oaths first and when I click again the lowest

Current Behavior

The logic seems buggy

Steps to Reproduce

Environment: Temp

  1. Click on Oathkeepers
  2. Click on the heading of Amount Staked

Detailed Description

You can check this voiced over video: https://drive.google.com/file/d/17SHHk6RaNymT0gK_LHfvAI2o5_hggpQK/view

ashishjur commented 4 years ago

Cause: for ascending sort of the column, value to param sortBy was sent as +Amount.

Our backend needs this value as Amount (without +). This is different than JSON:API standard, but because of ease of backend side development, we chose to do this.

I've fixed it. Now just like Advocate list's sorts, OathTaker's sorts will not mention + for ascending sorts.

tyagishuchi1 commented 4 years ago

@mtmsuhail Sort by Oaths also does not show proper data.