AthanorLabs / atomic-swap

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

past swaps should be in reverse chronological order #436

Closed dimalinux closed 1 year ago

dimalinux commented 1 year ago

Right now viewing past swaps with swapcli past shows the oldest swaps first, but I think that most users would prefer to see the recent swaps first.

eightfilms commented 1 year ago

Hey, was looking to contribute and saw this labelled as a good first issue. Would adding an option instead (eg. --rev) be a decent alternative here? Being able to see the latest transaction right above where you ran the command might be useful as well.

dimalinux commented 1 year ago

@bingcicle I'm skeptical that it would be useful, so I would skip it if it adds extra code complexity that we would need to maintain. The use case you mentioned at the end would be best solved by paging. You can pipe the output to head/less/more right now and we can add built-in paging when swapcli detects an interactive terminal later on. (Like the behavior of git log.)

eightfilms commented 1 year ago

@dimalinux makes sense - thanks for the quick response! Opened a PR at #448