CWA-169 | added trades to exchange trade store in router

This commit is contained in:
Oleksandr Sobol 2020-02-12 15:28:30 +02:00
parent a6fae62917
commit d7d03b4d2f
2 changed files with 4 additions and 2 deletions

View file

@ -418,7 +418,9 @@ class Router {
return MultiProvider(providers: [
ProxyProvider<SettingsStore, ExchangeTradeStore>(
update: (_, settingsStore, __) => ExchangeTradeStore(
trade: settings.arguments as Trade, walletStore: walletStore),
trade: settings.arguments as Trade,
walletStore: walletStore,
trades: trades),
)
], child: TradeDetailsPage());
});

View file

@ -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;