CAKE-278 | fixed calculating estimated amount when receive amount is entered; fixed applyTemplate() method in the exchange_page.dart and reset() method in the exchange_view_model.dart

This commit is contained in:
OleksandrSobol
2021-02-19 10:37:30 +02:00
parent 6e102c4969
commit fb6e7de166
3 changed files with 36 additions and 20 deletions
@@ -301,11 +301,10 @@ abstract class ExchangeViewModelBase with Store {
@action
void reset() {
_initialPairBasedOnWallet();
isReceiveAmountEntered = false;
depositAmount = '';
receiveAmount = '';
depositCurrency = CryptoCurrency.xmr;
receiveCurrency = CryptoCurrency.btc;
depositAddress = depositCurrency == wallet.currency ? wallet.address : '';
receiveAddress = receiveCurrency == wallet.currency ? wallet.address : '';
isDepositAddressEnabled = !(depositCurrency == wallet.currency);