sort transaction history
This commit is contained in:
parent
feb4a34d62
commit
38b90fa65c
@ -98,6 +98,9 @@ func (s *TransactionService) GetLightPageByLimit(ctx context.Context, pagenumber
|
||||
|
||||
transaction.Time = time.Unix(transaction.Timestamp, 0)
|
||||
transaction.TimeDescription = humanize.Time(transaction.Time)
|
||||
sort.Slice(transaction.Nft.TransactionHistory, func(i, j int) bool {
|
||||
return transaction.Nft.TransactionHistory[i].Timestamp > transaction.Nft.TransactionHistory[j].Timestamp
|
||||
})
|
||||
}
|
||||
|
||||
var res []Transaction
|
||||
|
Loading…
Reference in New Issue
Block a user