AthanorLabs/atomic-swap

past swaps should be in reverse chronological order

dimalinux opened this issue · 3 comments

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.

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.

@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.)

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