Skip to content

Commit

Permalink
Sort by BalanceNanosUint256 when fetching DAO Coin Holders (deso-prot…
Browse files Browse the repository at this point in the history
  • Loading branch information
lazynina authored May 3, 2022
1 parent 23eabd5 commit f9caf35
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions routes/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,9 @@ func (fes *APIServer) GetHodlersForPublicKey(ww http.ResponseWriter, req *http.R
if hodlList[jj].CreatorPublicKeyBase58Check == hodlList[jj].HODLerPublicKeyBase58Check {
return false
}
if requestData.IsDAOCoin {
return hodlList[ii].BalanceNanosUint256.Gt(&hodlList[jj].BalanceNanosUint256)
}
return hodlList[ii].BalanceNanos > hodlList[jj].BalanceNanos
})
if !requestData.FetchAll {
Expand Down

0 comments on commit f9caf35

Please sign in to comment.