mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-02-02 11:16:26 +00:00
Fix price sorting
This commit is contained in:
parent
46c64c782e
commit
aa820d4149
1 changed files with 5 additions and 3 deletions
|
@ -379,10 +379,12 @@ abstract class BalanceViewModelBase with Store {
|
|||
switch (sortBalanceBy) {
|
||||
case SortBalanceBy.FiatBalance:
|
||||
sortedMap.addAll(Map.fromEntries(wallet.balance.entries.toList()
|
||||
..sort((e1, e2) => double.parse(
|
||||
_getFiatBalance(price: price, cryptoAmount: e2.value.formattedAvailableBalance))
|
||||
..sort((e1, e2) => double.parse(_getFiatBalance(
|
||||
price: fiatConvertationStore.prices[e2.key]!,
|
||||
cryptoAmount: e2.value.formattedAvailableBalance))
|
||||
.compareTo(double.parse(_getFiatBalance(
|
||||
price: price, cryptoAmount: e1.value.formattedAvailableBalance))))));
|
||||
price: fiatConvertationStore.prices[e1.key]!,
|
||||
cryptoAmount: e1.value.formattedAvailableBalance))))));
|
||||
break;
|
||||
case SortBalanceBy.GrossBalance:
|
||||
sortedMap.addAll(Map.fromEntries(wallet.balance.entries.toList()
|
||||
|
|
Loading…
Reference in a new issue