AthanorLabs / atomic-swap

💫 ETH-XMR atomic swap implementation
GNU Lesser General Public License v3.0
345 stars 44 forks source link

feat: update GetPast() and GetOngoing() to sort from newest to oldest #448

Closed eightfilms closed 1 year ago

eightfilms commented 1 year ago

closes #436

Changes the RPC call to sort from newest to oldest.

While looking into this I realized that GetOngoing() also returns swaps sorted from oldest to newest:

https://github.com/AthanorLabs/atomic-swap/blob/906a5c69a386448071f048bc05b8b198f779ae9c/rpc/swap.go#L201-L203

Should this be updated as well in a separate PR for consistency?

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: +0.05 :tada:

Comparison is base (f9a63ff) 57.96% compared to head (cd81580) 58.02%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #448 +/- ## ========================================== + Coverage 57.96% 58.02% +0.05% ========================================== Files 124 124 Lines 11601 11601 ========================================== + Hits 6725 6731 +6 + Misses 4147 4144 -3 + Partials 729 726 -3 ``` | [Impacted Files](https://codecov.io/gh/AthanorLabs/atomic-swap/pull/448?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [rpc/swap.go](https://codecov.io/gh/AthanorLabs/atomic-swap/pull/448?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cnBjL3N3YXAuZ28=) | `23.64% <0.00%> (ø)` | | ... and [3 files with indirect coverage changes](https://codecov.io/gh/AthanorLabs/atomic-swap/pull/448/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

dimalinux commented 1 year ago

Should this be updated as well in a separate PR for consistency?

Yes, it should be updated, but let's change them all in a single PR. i.e. Can you add that to this PR? Thanks!