mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-09 12:19:24 +00:00
fix: wallets coin sorting matching Coin enum order
This commit is contained in:
parent
724c1e7f16
commit
f2e43bfaee
1 changed files with 4 additions and 9 deletions
|
@ -84,17 +84,12 @@ class Wallets extends ChangeNotifier {
|
||||||
}
|
}
|
||||||
final List<Tuple2<Coin, List<ChangeNotifierProvider<Manager>>>> result = [];
|
final List<Tuple2<Coin, List<ChangeNotifierProvider<Manager>>>> result = [];
|
||||||
|
|
||||||
for (final coin in map.keys) {
|
for (final coin in Coin.values) {
|
||||||
result.add(Tuple2(coin, map[coin]!));
|
if (map[coin] != null) {
|
||||||
|
result.add(Tuple2(coin, map[coin]!));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// result.sort((a, b) => a.item1.prettyName.compareTo(b.item1.prettyName));
|
|
||||||
result.sort((a, b) => a.item1.prettyName == "Bitcoin"
|
|
||||||
? -1
|
|
||||||
: b.item1.prettyName == "Monero"
|
|
||||||
? 1
|
|
||||||
: a.item1.prettyName.compareTo(b.item1.prettyName));
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue