tdex-network / tdex-daemon

Go implementation of the TDEX Beta Daemon
https://tdex.network
MIT License
11 stars 13 forks source link

Order trades, deposits and withdrawal by timestamp (desc) #513

Closed altafan closed 2 years ago

altafan commented 2 years ago

This makes the lists returned by ListTrades, ListDeposits and ListWithdrawals RPCs of the Operator interface ordered by date, from the newest to the oldest.

For this, it's been necessary to add a Timestamp field to both the Deposit and Withdrawal domains. Unfortunately, all deposits/withdrawals made before this don't have a timestamp so they still might not be ordered properly.

NOTE: before this, the app level used concurrency to parse a []domain.Trade list into an []application.TradeInfo. It now uses a simple sequential for loop otherwise the order of the list returned by the repository could be broken.

HOTFIX: This adds the (missing) entry for the GetMarketInfo RPC to the macaroon permission map.

This closes #511. This closes #512.

Please @tiero review this.