From d7d03b4d2f73eb5c971bae570cc376a5602fc8c7 Mon Sep 17 00:00:00 2001 From: Oleksandr Sobol Date: Wed, 12 Feb 2020 15:28:30 +0200 Subject: [PATCH] CWA-169 | added trades to exchange trade store in router --- lib/router.dart | 4 +++- .../exchange/morphtoken/morphtoken_exchange_provider.dart | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/router.dart b/lib/router.dart index 03c7e477a..bca3bebce 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -418,7 +418,9 @@ class Router { return MultiProvider(providers: [ ProxyProvider( update: (_, settingsStore, __) => ExchangeTradeStore( - trade: settings.arguments as Trade, walletStore: walletStore), + trade: settings.arguments as Trade, + walletStore: walletStore, + trades: trades), ) ], child: TradeDetailsPage()); }); diff --git a/lib/src/domain/exchange/morphtoken/morphtoken_exchange_provider.dart b/lib/src/domain/exchange/morphtoken/morphtoken_exchange_provider.dart index af26e7203..b150ebce1 100644 --- a/lib/src/domain/exchange/morphtoken/morphtoken_exchange_provider.dart +++ b/lib/src/domain/exchange/morphtoken/morphtoken_exchange_provider.dart @@ -206,7 +206,7 @@ class MorphTokenExchangeProvider extends ExchangeProvider { final state = TradeState.deserialize(raw: status.toLowerCase()); String amount = ""; - for (final trade in trades.values.toList()) { + for (final trade in trades.values) { if (trade.id == id) { amount = trade.amount; break;