From e4d46000822a6b82fcd27473fdb38e90d1545082 Mon Sep 17 00:00:00 2001 From: Oleksandr Sobol Date: Wed, 5 Feb 2020 20:51:02 +0200 Subject: [PATCH] CWA-169 | fixed getting toCurrency and inputAddress from response in findTradeById method --- .../exchange/morphtoken/morphtoken_exchange_provider.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/domain/exchange/morphtoken/morphtoken_exchange_provider.dart b/lib/src/domain/exchange/morphtoken/morphtoken_exchange_provider.dart index 28cd0db6e..0637607df 100644 --- a/lib/src/domain/exchange/morphtoken/morphtoken_exchange_provider.dart +++ b/lib/src/domain/exchange/morphtoken/morphtoken_exchange_provider.dart @@ -154,9 +154,9 @@ class MorphTokenExchangeProvider extends ExchangeProvider { final responseJSON = json.decode(response.body) as Map; final fromCurrency = responseJSON['input']['asset'] as String; final from = CryptoCurrency.fromString(fromCurrency.toLowerCase()); - final toCurrency = responseJSON['output']['asset'] as String; + final toCurrency = responseJSON['output'][0]['asset'] as String; final to = CryptoCurrency.fromString(toCurrency.toLowerCase()); - final inputAddress = responseJSON['input']['refund_address'] as String; + final inputAddress = responseJSON['input']['deposit_address'] as String; final status = responseJSON['state'] as String; final state = TradeState.deserialize(raw: status.toLowerCase());