mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
consistently order unspent coins / prevent coins jumping around
This commit is contained in:
parent
ff5fbd7946
commit
096282032b
1 changed files with 9 additions and 0 deletions
|
@ -146,6 +146,15 @@ abstract class UnspentCoinsListViewModelBase with Store {
|
|||
}
|
||||
});
|
||||
|
||||
// sort by hash so that even if the addresses are the same, they don't jump around when selected (because that calls updateBalance)
|
||||
unspents.sort((a, b) => a.hash.compareTo(b.hash));
|
||||
|
||||
// sort unspents by address so that if something changes it's easier to see:
|
||||
unspents.sort((a, b) => a.address.compareTo(b.address));
|
||||
|
||||
// sort change addresses to the end:
|
||||
// unspents.sort((a, b) => a.isChange ? 1 : -1);
|
||||
|
||||
_items.addAll(unspents);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue