|
|
@ -210,6 +210,7 @@ public class ExchangeMethodV2Activity extends BaseActivity implements PaymentMod |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//TODO Implementation for calculating exchange rate on the basis of provided default receiving amount for native country only // |
|
|
|
@Override |
|
|
|
public void onCountrySelected(CountryPaymentService countryPaymentService) { |
|
|
|
this.selectedCountryPaymentService = countryPaymentService; |
|
|
@ -225,6 +226,37 @@ public class ExchangeMethodV2Activity extends BaseActivity implements PaymentMod |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//TODO Implementation for calculating exchange rate on the basis of provided default receiving amount for corresponding currency. |
|
|
|
// @Override |
|
|
|
// public void onCountrySelected(CountryPaymentService countryPaymentService) { |
|
|
|
// this.selectedCountryPaymentService = countryPaymentService; |
|
|
|
// showSelectedRecipient(countryPaymentService.getCountryCode(), countryPaymentService.getCurrency()); |
|
|
|
// if (this.countryListingDialog != null) { |
|
|
|
// this.countryListingDialog.hideKeyboard(); |
|
|
|
// this.countryListingDialog.dismiss(); |
|
|
|
// } |
|
|
|
// this.presenter.getDefaultReceivingAmountForSelectedCurrency(countryPaymentService); |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public void updateReceivingAmountAndFetchExchangeRate(String amount) { |
|
|
|
registerAvailableTextWatchersForEditText(recieveMoneyEditText, true); |
|
|
|
recieveMoneyEditText.setText(amount); |
|
|
|
shouldCaulatedByRecipient = true; |
|
|
|
registerAvailableTextWatchersForEditText(recieveMoneyEditText, false); |
|
|
|
showPaymentService(true, this.selectedCountryPaymentService.getServiceAvailable()); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void fallbackToSendingAmountAndFetchExchangeRate() { |
|
|
|
registerAvailableTextWatchersForEditText(recieveMoneyEditText, false); |
|
|
|
recieveMoneyEditText.setText(""); |
|
|
|
shouldCaulatedByRecipient = true; |
|
|
|
registerAvailableTextWatchersForEditText(recieveMoneyEditText, true); |
|
|
|
showPaymentService(true, this.selectedCountryPaymentService.getServiceAvailable()); |
|
|
|
} |
|
|
|
|
|
|
|
private void showSelectedRecipient(String selectedCountryCode, String selectedCountryCurrency) { |
|
|
|
int flagResId = CountryFlagMapper.getFlagFromCountryCode(selectedCountryCode); |
|
|
|
if (flagResId != -1) |
|
|
|