From ec15a9b229a8029d61f7d7ac3945a33182d1aa1a Mon Sep 17 00:00:00 2001 From: Serhii Date: Mon, 28 Nov 2022 00:53:20 +0200 Subject: [PATCH] fix updateTradeList bug --- lib/store/dashboard/trades_store.dart | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/store/dashboard/trades_store.dart b/lib/store/dashboard/trades_store.dart index 6e763196b..72442b46f 100644 --- a/lib/store/dashboard/trades_store.dart +++ b/lib/store/dashboard/trades_store.dart @@ -31,13 +31,8 @@ abstract class TradesStoreBase with Store { void setTrade(Trade trade) => this.trade = trade; @action - Future updateTradeList() async { - if (trade == null) { - return; - } - - trades = tradesSource.values.map((trade) => TradeListItem( - trade: trade!, - settingsStore: settingsStore)).toList(); - } + Future updateTradeList() async => trades = + tradesSource.values.map((trade) => TradeListItem( + trade: trade, + settingsStore: settingsStore)).toList(); } \ No newline at end of file