fix updateTradeList bug
Serhii committed
Nov 28, 2022 at 00:53 UTC
ec15a9b229a8029d61f7d7ac3945a33182d1aa1a
1 file changed
+4
-9
lib/store/dashboard/trades_store.dart
+4
-9
@@ -31,13 +31,8 @@ abstract class TradesStoreBase with Store {
31
void setTrade(Trade trade) => this.trade = trade;
32
33
@action
34
- Future<void> updateTradeList() async {
35
- if (trade == null) {
36
- return;
37
- }
38
-
39
- trades = tradesSource.values.map((trade) => TradeListItem(
40
- trade: trade!,
41
- settingsStore: settingsStore)).toList();
42
- }
34
+ Future<void> updateTradeList() async => trades =
35
+ tradesSource.values.map((trade) => TradeListItem(
36
+ trade: trade,
37
+ settingsStore: settingsStore)).toList();
38
}
\ No newline at end of file