Skip to content

Commit

Permalink
fix: order list tx by time asc
Browse files Browse the repository at this point in the history
  • Loading branch information
sp.bean committed Sep 14, 2023
1 parent 3c28fec commit 43e4703
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/job/track_friend_tech_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ func (c *trackFriendTechKeys) Run() error {
}

// check if there is any new transaction
for _, tx := range txs.Data {
for i := len(txs.Data) - 1; i >= 0; i-- {
tx := txs.Data[i]
if time.Now().Unix()-jobInterval <= int64(tx.Timestamp) {
messages = append(messages, queuetypes.NotifierMessage{
Type: typeset.NOTIFICATION_KEY_NEW_TRANSACTION,
Expand Down

0 comments on commit 43e4703

Please sign in to comment.