Fix transaction sorting comparator

Fix sorting comparator. Closes #627. This is UI, no tests included.