diff --git a/lib/services/wallets.dart b/lib/services/wallets.dart index 3ae837f44..8df8d2209 100644 --- a/lib/services/wallets.dart +++ b/lib/services/wallets.dart @@ -84,17 +84,12 @@ class Wallets extends ChangeNotifier { } final List>>> result = []; - for (final coin in map.keys) { - result.add(Tuple2(coin, map[coin]!)); + for (final coin in Coin.values) { + 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; }