Skip to content

Commit

Permalink
sort unwraps on rpc call
Browse files Browse the repository at this point in the history
  • Loading branch information
sumoshi21 authored Jul 4, 2023
1 parent 73dd5b2 commit c00a98b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rpc/api/embedded/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,9 @@ func (a *BridgeApi) GetAllUnwrapTokenRequestsByToAddress(toAddress string, pageI
specificRequests = append(specificRequests, request)
}
}
sort.Slice(specificRequests[:], func(i, j int) bool {
return specificRequests[i].RegistrationMomentumHeight > specificRequests[j].RegistrationMomentumHeight
})

}
result.Count = len(specificRequests)
Expand Down

0 comments on commit c00a98b

Please sign in to comment.