CWA-169 | fixed getting toCurrency and inputAddress from response in findTradeById method
Oleksandr Sobol committed
Feb 5, 2020 at 20:51 UTC
e4d46000822a6b82fcd27473fdb38e90d1545082
1 file changed
+2
-2
lib/src/domain/exchange/morphtoken/morphtoken_exchange_provider.dart
+2
-2
@@ -154,9 +154,9 @@ class MorphTokenExchangeProvider extends ExchangeProvider {
154
final responseJSON = json.decode(response.body) as Map<String, dynamic>;
155
final fromCurrency = responseJSON['input']['asset'] as String;
156
final from = CryptoCurrency.fromString(fromCurrency.toLowerCase());
157
- final toCurrency = responseJSON['output']['asset'] as String;
157
+ final toCurrency = responseJSON['output'][0]['asset'] as String;
158
final to = CryptoCurrency.fromString(toCurrency.toLowerCase());
159
- final inputAddress = responseJSON['input']['refund_address'] as String;
159
+ final inputAddress = responseJSON['input']['deposit_address'] as String;
160
final status = responseJSON['state'] as String;
161
final state = TradeState.deserialize(raw: status.toLowerCase());
162