fix updateTradeList bug

This commit is contained in:
Serhii 2022-11-28 00:53:20 +02:00
parent 4d91ef6af8
commit ec15a9b229

View file

@ -31,13 +31,8 @@ abstract class TradesStoreBase with Store {
void setTrade(Trade trade) => this.trade = trade;
@action
Future<void> updateTradeList() async {
if (trade == null) {
return;
}
trades = tradesSource.values.map((trade) => TradeListItem(
trade: trade!,
settingsStore: settingsStore)).toList();
}
Future<void> updateTradeList() async => trades =
tradesSource.values.map((trade) => TradeListItem(
trade: trade,
settingsStore: settingsStore)).toList();
}