diff --git a/cyberwow/lib/controller/rpc/rpc2.dart b/cyberwow/lib/controller/rpc/rpc2.dart index 4ddb9a7..26e51ca 100644 --- a/cyberwow/lib/controller/rpc/rpc2.dart +++ b/cyberwow/lib/controller/rpc/rpc2.dart @@ -103,7 +103,7 @@ Future> getTransactionPoolSimple() async { // 'blob_size', ]; - return Map.fromIterable + final _tx = Map.fromIterable ( x.keys.where ( @@ -151,8 +151,24 @@ Future> getTransactionPoolSimple() async { return MapEntry(k, v); } } - ) - ; + ); + + final List keys = + [ + 'id', + 'time', + 'fee', + 'in/out', + 'size', + ] + .where((k) => _tx.keys.contains(k)) + .toList(); + + final _sortedTx = { + for (var k in keys) k: _tx[k] + }; + + return _sortedTx; } ).toList(); }