CAKE-43 | added the ability to enter an amount for xmr.to exchange in both currencies xmr and btc; added isReceiveAmountEntered to ExchangeViewModel; added receiveAmount and isBTCRequest to XMRTOTradeRequest; added isReceiveAmount to calculateAmount method of ExchangeProvider; fixed XMRTOExchangeProvider

This commit is contained in:
OleksandrSobol
2020-09-25 22:55:41 +03:00
parent dcbaf01118
commit bc85058ad8
8 changed files with 50 additions and 20 deletions
@@ -186,7 +186,8 @@ class MorphTokenExchangeProvider extends ExchangeProvider {
@override
Future<double> calculateAmount(
{CryptoCurrency from, CryptoCurrency to, double amount}) async {
{CryptoCurrency from, CryptoCurrency to, double amount,
bool isReceiveAmount}) async {
final url = apiUri + _ratesURISuffix;
final response = await get(url);
final responseJSON = json.decode(response.body) as Map<String, dynamic>;