diff --git a/commonui/src/main/java/com/hyperwallet/android/ui/common/util/CurrencyParser.java b/commonui/src/main/java/com/hyperwallet/android/ui/common/util/CurrencyParser.java index ce979891b..6f11835e7 100644 --- a/commonui/src/main/java/com/hyperwallet/android/ui/common/util/CurrencyParser.java +++ b/commonui/src/main/java/com/hyperwallet/android/ui/common/util/CurrencyParser.java @@ -1,13 +1,19 @@ package com.hyperwallet.android.ui.common.util; +import static com.hyperwallet.android.model.transfer.Transfer.EMPTY_STRING; + import android.content.Context; +import androidx.annotation.VisibleForTesting; + import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.io.IOException; import java.io.InputStream; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; import java.text.NumberFormat; import java.util.ArrayList; import java.util.Currency; @@ -17,6 +23,8 @@ public class CurrencyParser { private static CurrencyParser instance; private static final String CURRENCY_LIST = "currency.json"; private List currencyList; + private static final String REGEX_REMOVE_EMPTY_SPACE = "^\\s+|\\s+$"; + private CurrencyParser(Context context) { currencyList = populateCurrencyList(readJSONFromAsset(context)); @@ -80,7 +88,8 @@ public String formatCurrency(String currency, String amount) { return format.format(Double.parseDouble(amount)); } - private int getNumberOfFractionDigits(String currencyCode) { + @VisibleForTesting + int getNumberOfFractionDigits(String currencyCode) { for (CurrencyDetails list : currencyList) { if (list.getCurrencyCode().equals(currencyCode)) { return list.getDecimals(); @@ -89,4 +98,33 @@ private int getNumberOfFractionDigits(String currencyCode) { return 0; } + + /** + * Formats the currency as per currency.json code. + * + * @param currency Any currency symbol. + * @param amount Any valid number in decimal. + * @return Returns the formatted number as per currency.json. + */ + + public String formatCurrencyWithSymbol(String currency, String amount) { + DecimalFormat currencyFormatter = (DecimalFormat) DecimalFormat.getCurrencyInstance(); + CurrencyDetails currencyDetails = getCurrency(currency); + currencyFormatter.setMinimumFractionDigits(currencyDetails == null ? 0 : currencyDetails.getDecimals()); + currencyFormatter.setCurrency(Currency.getInstance(currency)); + DecimalFormatSymbols decimalFormatSymbols = currencyFormatter.getDecimalFormatSymbols(); + decimalFormatSymbols.setCurrencySymbol(""); + currencyFormatter.setDecimalFormatSymbols(decimalFormatSymbols); + String formattedAmount = currencyFormatter.format(Double.parseDouble(amount)).replaceAll(REGEX_REMOVE_EMPTY_SPACE, EMPTY_STRING); + return currencyDetails == null ? "" : currencyDetails.getSymbol() + formattedAmount; + } + + public CurrencyDetails getCurrency(String currencyCode) { + for (CurrencyDetails list : currencyList) { + if (list.getCurrencyCode().equals(currencyCode)) { + return list; + } + } + return null; + } } diff --git a/commonui/src/test/java/com/hyperwallet/android/ui/common/util/CurrencyParserTest.java b/commonui/src/test/java/com/hyperwallet/android/ui/common/util/CurrencyParserTest.java index ceb404988..9637542e8 100644 --- a/commonui/src/test/java/com/hyperwallet/android/ui/common/util/CurrencyParserTest.java +++ b/commonui/src/test/java/com/hyperwallet/android/ui/common/util/CurrencyParserTest.java @@ -89,4 +89,33 @@ public void testAllCurrencyFormats() { assertThat(currency, is(currencyMap.getValue())); } } + + @Test + public void testCurrencyFormatWithSymbol() { + String amount = "1000000"; + Context context = ApplicationProvider.getApplicationContext(); + String currency = CurrencyParser.getInstance(context).formatCurrencyWithSymbol("USD", amount); + assertThat(currency, is("$1,000,000.00")); + } + @Test + public void testGetNumberOfFractionDigits_ThreeDigitDecimal(){ + Context context = ApplicationProvider.getApplicationContext(); + int noOfDigits = CurrencyParser.getInstance(context).getNumberOfFractionDigits("TND"); + assertThat(noOfDigits, is(3)); + } + + @Test + public void testGetCurrency() { + Context context = ApplicationProvider.getApplicationContext(); + CurrencyDetails currencyDetails = CurrencyParser.getInstance(context).getCurrency("TND"); + assertThat(currencyDetails.getSymbol(), is("د.ت")); + assertThat(currencyDetails.getDecimals(),is(3)); + } + + @Test + public void testGetNumberOfFractionDigits_NoDigitDecimal(){ + Context context = ApplicationProvider.getApplicationContext(); + int noOfDigits = CurrencyParser.getInstance(context).getNumberOfFractionDigits("JPY"); + assertThat(noOfDigits, is(0)); + } } diff --git a/transferui/src/androidTest/java/com/hyperwallet/android/ui/transfer/SelectDestinationTest.java b/transferui/src/androidTest/java/com/hyperwallet/android/ui/transfer/SelectDestinationTest.java index 058db1dbb..112871418 100644 --- a/transferui/src/androidTest/java/com/hyperwallet/android/ui/transfer/SelectDestinationTest.java +++ b/transferui/src/androidTest/java/com/hyperwallet/android/ui/transfer/SelectDestinationTest.java @@ -197,7 +197,7 @@ public void testSelectDestination_verifyDestinationNotUpdatedWhenClickingBackBut onView(withId(R.id.transfer_destination_description_2)).check(matches(withText("ending in 0616"))); onView(withId(R.id.transfer_summary)).perform(nestedScrollTo()).check(matches(isDisplayed())); - String availableFundUSD = getAvailableFund("998.00", "USD"); + String availableFundUSD = getAvailableFund("$","998.00", "USD"); onView(withId(R.id.transfer_summary)).check(matches(withText(availableFundUSD))); onView(withId(R.id.transfer_destination_title)).perform(click()); @@ -280,7 +280,7 @@ public void testSelectDestination_verifyDestinationUpdatedUponAddingNewExternalA onView(withId(R.id.transfer_destination_description_2)).check(matches(withText("ending in 5121"))); onView(withId(R.id.transfer_summary)).perform(nestedScrollTo()).check(matches(isDisplayed())); - String availableFundCAD = getAvailableFund("1,157.40", "CAD"); + String availableFundCAD = getAvailableFund("$","1,157.40", "CAD"); onView(withId(R.id.transfer_summary)).check(matches(withText(availableFundCAD))); } @@ -306,7 +306,7 @@ public void testSelectDestination_verifyDestinationUpdatedUponSelection() { onView(withId(R.id.transfer_destination_description_2)).check(matches(withText("ending in 0616"))); onView(withId(R.id.transfer_summary)).perform(nestedScrollTo()).check(matches(isDisplayed())); - String availableFundUSD = getAvailableFund("998.00", "USD"); + String availableFundUSD = getAvailableFund("$","998.00", "USD"); onView(withId(R.id.transfer_summary)).check(matches(withText(availableFundUSD))); onView(withId(R.id.transfer_destination_title)).perform(click()); @@ -326,7 +326,7 @@ public void testSelectDestination_verifyDestinationUpdatedUponSelection() { onView(withId(R.id.transfer_all_funds)).perform(nestedScrollTo()).check(matches(isDisplayed())); onView(withId(R.id.transfer_all_funds)).check(matches(not(isSelected()))); onView(withId(R.id.transfer_summary)).perform(nestedScrollTo()).check(matches(isDisplayed())); - String availableFundUSD2 = getAvailableFund("1000.00", "USD"); + String availableFundUSD2 = getAvailableFund("$","1,000.00", "USD"); onView(withId(R.id.transfer_summary)).check(matches(withText(availableFundUSD2))); onView(withId(R.id.transfer_notes)).perform(nestedScrollTo()).check(matches(isDisplayed())); @@ -425,9 +425,9 @@ public void testSelectDestination_listTransferMethodsConnectionError() { } - private String getAvailableFund(String amount, String currency) { + private String getAvailableFund(String symbol,String amount, String currency) { String availableFund = String.format(InstrumentationRegistry.getInstrumentation().getTargetContext() - .getString(R.string.mobileAvailableBalance), amount , currency); + .getString(R.string.mobileAvailableBalance),symbol, amount , currency); return availableFund; } diff --git a/transferui/src/androidTest/java/com/hyperwallet/android/ui/transfer/TransferPPCFundsTest.java b/transferui/src/androidTest/java/com/hyperwallet/android/ui/transfer/TransferPPCFundsTest.java index ad777db7b..b42be417b 100644 --- a/transferui/src/androidTest/java/com/hyperwallet/android/ui/transfer/TransferPPCFundsTest.java +++ b/transferui/src/androidTest/java/com/hyperwallet/android/ui/transfer/TransferPPCFundsTest.java @@ -157,7 +157,7 @@ public void testTransferFunds_verifyTransferScreen() { onView(withId(R.id.transfer_all_funds)).perform(nestedScrollTo()).check(matches(isDisplayed())); onView(withId(R.id.transfer_all_funds)).check(matches(not(isSelected()))); onView(withId(R.id.transfer_summary)).perform(nestedScrollTo()).check(matches(isDisplayed())); - String availableFundUSD = getAvailableFund("998.00", "USD"); + String availableFundUSD = getAvailableFund("$","998.00", "USD"); onView(withId(R.id.transfer_summary)).check(matches(withText(availableFundUSD))); onView(withId(R.id.transfer_action_button)).perform(nestedScrollTo()); @@ -203,7 +203,7 @@ public void testTransferFunds_verifyDestinationUpdatedAfterAddingNewExternalAcco onView(withId(R.id.transfer_all_funds)).perform(nestedScrollTo()).check(matches(isDisplayed())); onView(withId(R.id.transfer_all_funds)).check(matches(not(isSelected()))); onView(withId(R.id.transfer_summary)).perform(nestedScrollTo()).check(matches(isDisplayed())); - String availableFundUSD = getAvailableFund("998.00", "USD"); + String availableFundUSD = getAvailableFund("$","998.00", "USD"); onView(withId(R.id.transfer_summary)).check(matches(withText(availableFundUSD))); onView(withId(R.id.transfer_action_button)).check(matches(isEnabled())); @@ -270,7 +270,7 @@ public void onReceive(Context context, Intent intent) { onView(withId(R.id.transfer_destination_description_2)).check(matches(withText("ending in 5121"))); onView(withId(R.id.transfer_summary)).perform(nestedScrollTo()).check(matches(isDisplayed())); - String availableFundCAD = getAvailableFund("1,157.40", "CAD"); + String availableFundCAD = getAvailableFund("$","1,157.40", "CAD"); onView(withId(R.id.transfer_summary)).check(matches(withText(availableFundCAD))); onView(withId(R.id.transfer_amount)).perform(nestedScrollTo(), replaceText("150.00")); @@ -282,24 +282,24 @@ public void onReceive(Context context, Intent intent) { matches(atPosition(0, hasDescendant( allOf(withId(R.id.sell_label), withText(R.string.mobileFXsell)))))); onView(withId(R.id.list_foreign_exchange)).check( - matches(atPosition(0, hasDescendant(allOf(withId(R.id.sell_value), withText("117.87 USD")))))); + matches(atPosition(0, hasDescendant(allOf(withId(R.id.sell_value), withText("$117.87 USD")))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(0, hasDescendant(allOf(withId(R.id.buy_label), withText(R.string.mobileFXbuy)))))); onView(withId(R.id.list_foreign_exchange)).check( - matches(atPosition(0, hasDescendant(allOf(withId(R.id.buy_value), withText("152.20 CAD")))))); + matches(atPosition(0, hasDescendant(allOf(withId(R.id.buy_value), withText("$152.20 CAD")))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(0, hasDescendant( allOf(withId(R.id.exchange_rate_label), withText(R.string.mobileFXRateLabel)))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(0, - hasDescendant(allOf(withId(R.id.exchange_rate_value), withText("1 USD = 1.291253 CAD")))))); + hasDescendant(allOf(withId(R.id.exchange_rate_value), withText("$1 USD = $1.291253 CAD")))))); onView(withId(R.id.amount_label)).check(matches(withText(R.string.mobileConfirmDetailsAmount))); - onView(withId(R.id.amount_value)).check(matches(withText("152.20 CAD"))); + onView(withId(R.id.amount_value)).check(matches(withText("$152.20 CAD"))); onView(withId(R.id.fee_label)).check(matches(withText(R.string.mobileConfirmDetailsFee))); - onView(withId(R.id.fee_value)).check(matches(withText("2.20 CAD"))); + onView(withId(R.id.fee_value)).check(matches(withText("$2.20 CAD"))); onView(withId(R.id.transfer_label)).check(matches(withText(R.string.mobileConfirmDetailsTotal))); - onView(withId(R.id.transfer_value)).check(matches(withText("150.00 CAD"))); + onView(withId(R.id.transfer_value)).check(matches(withText("$150.00 CAD"))); onView(withId(R.id.exchange_rate_warning_container)).check(matches(not(isDisplayed()))); onView(withId(R.id.exchange_rate_warning)).check(matches(not(isDisplayed()))); onView(withId(R.id.notes_container)).check(matches(not(isDisplayed()))); @@ -358,7 +358,7 @@ public void onReceive(Context context, Intent intent) { onView(withId(R.id.transfer_summary)).perform(nestedScrollTo()).check(matches(isDisplayed())); String availableFundUSD = String.format(InstrumentationRegistry.getInstrumentation().getTargetContext() - .getString(R.string.mobileAvailableBalance), "998.00" , "USD"); + .getString(R.string.mobileAvailableBalance),"$", "998.00" , "USD"); onView(withId(R.id.transfer_summary)).check(matches(withText(availableFundUSD))); onView(withId(R.id.transfer_amount)).perform(nestedScrollTo(), replaceText("100.00")); @@ -366,11 +366,11 @@ public void onReceive(Context context, Intent intent) { onView(withId(R.id.list_foreign_exchange)).check(matches(not(isDisplayed()))); onView(withId(R.id.amount_label)).check(matches(withText(R.string.mobileConfirmDetailsAmount))); - onView(withId(R.id.amount_value)).check(matches(withText("102.00 USD"))); + onView(withId(R.id.amount_value)).check(matches(withText("$102.00 USD"))); onView(withId(R.id.fee_label)).check(matches(withText(R.string.mobileConfirmDetailsFee))); - onView(withId(R.id.fee_value)).check(matches(withText("2.00 USD"))); + onView(withId(R.id.fee_value)).check(matches(withText("$2.00 USD"))); onView(withId(R.id.transfer_label)).check(matches(withText(R.string.mobileConfirmDetailsTotal))); - onView(withId(R.id.transfer_value)).check(matches(withText("100.00 USD"))); + onView(withId(R.id.transfer_value)).check(matches(withText("$100.00 USD"))); onView(withId(R.id.exchange_rate_warning_container)).check(matches(not(isDisplayed()))); onView(withId(R.id.exchange_rate_warning)).check(matches(not(isDisplayed()))); onView(withId(R.id.notes_container)).check(matches(not(isDisplayed()))); @@ -428,7 +428,7 @@ public void onReceive(Context context, Intent intent) { onView(withId(R.id.transfer_destination_description_2)).check(matches(withText("ending in 0616"))); onView(withId(R.id.transfer_summary)).perform(nestedScrollTo()).check(matches(isDisplayed())); - String availableFundUSD = getAvailableFund("998.00", "USD"); + String availableFundUSD = getAvailableFund("$","998.00", "USD"); onView(withId(R.id.transfer_summary)).check(matches(withText(availableFundUSD))); onView(withId(R.id.transfer_amount)).perform(nestedScrollTo(), replaceText("100.00")); @@ -438,11 +438,11 @@ public void onReceive(Context context, Intent intent) { onView(withId(R.id.list_foreign_exchange)).check(matches(not(isDisplayed()))); onView(withId(R.id.amount_label)).check(matches(withText(R.string.mobileConfirmDetailsAmount))); - onView(withId(R.id.amount_value)).check(matches(withText("102.00 USD"))); + onView(withId(R.id.amount_value)).check(matches(withText("$102.00 USD"))); onView(withId(R.id.fee_label)).check(matches(withText(R.string.mobileConfirmDetailsFee))); - onView(withId(R.id.fee_value)).check(matches(withText("2.00 USD"))); + onView(withId(R.id.fee_value)).check(matches(withText("$2.00 USD"))); onView(withId(R.id.transfer_label)).check(matches(withText(R.string.mobileConfirmDetailsTotal))); - onView(withId(R.id.transfer_value)).check(matches(withText("100.00 USD"))); + onView(withId(R.id.transfer_value)).check(matches(withText("$100.00 USD"))); onView(withId(R.id.exchange_rate_warning_container)).check(matches(not(isDisplayed()))); onView(withId(R.id.exchange_rate_warning)).check(matches(not(isDisplayed()))); onView(withId(R.id.notes_container)).perform(nestedScrollTo()).check(matches(isDisplayed())); @@ -503,7 +503,7 @@ public void onReceive(Context context, Intent intent) { onView(withId(R.id.transfer_destination_description_2)).check(matches(withText("ending in 0616"))); onView(withId(R.id.transfer_summary)).perform(nestedScrollTo()).check(matches(isDisplayed())); - String availableFundUSD = getAvailableFund("998.00","USD"); + String availableFundUSD = getAvailableFund("$","998.00","USD"); onView(withId(R.id.transfer_summary)).check(matches(withText(availableFundUSD))); onView(withId(R.id.transfer_amount)).perform(nestedScrollTo(), replaceText("100.00")); @@ -513,7 +513,7 @@ public void onReceive(Context context, Intent intent) { onView(withId(R.id.list_foreign_exchange)).check(matches(not(isDisplayed()))); onView(withId(R.id.amount_label)).check(matches(withText(R.string.mobileConfirmDetailsAmount))); - onView(withId(R.id.amount_value)).check(matches(withText("100.00 USD"))); + onView(withId(R.id.amount_value)).check(matches(withText("$100.00 USD"))); onView(withId(R.id.fee_label)).check(matches(not(isDisplayed()))); onView(withId(R.id.fee_value)).check(matches(not(isDisplayed()))); onView(withId(R.id.transfer_label)).check(matches(not(isDisplayed()))); @@ -583,11 +583,11 @@ public void onReceive(Context context, Intent intent) { onView(withId(R.id.list_foreign_exchange)).check(matches(not(isDisplayed()))); onView(withId(R.id.amount_label)).check(matches(withText(R.string.mobileConfirmDetailsAmount))); - onView(withId(R.id.amount_value)).check(matches(withText("1,000.00 USD"))); + onView(withId(R.id.amount_value)).check(matches(withText("$1,000.00 USD"))); onView(withId(R.id.fee_label)).check(matches(withText(R.string.mobileConfirmDetailsFee))); - onView(withId(R.id.fee_value)).check(matches(withText("2.00 USD"))); + onView(withId(R.id.fee_value)).check(matches(withText("$2.00 USD"))); onView(withId(R.id.transfer_label)).check(matches(withText(R.string.mobileConfirmDetailsTotal))); - onView(withId(R.id.transfer_value)).check(matches(withText("998.00 USD"))); + onView(withId(R.id.transfer_value)).check(matches(withText("$998.00 USD"))); onView(withId(R.id.exchange_rate_warning_container)).check(matches(not(isDisplayed()))); onView(withId(R.id.exchange_rate_warning)).check(matches(not(isDisplayed()))); onView(withId(R.id.notes_container)).perform(nestedScrollTo()); @@ -782,11 +782,11 @@ public void testTransferFunds_createTransferConnectionError() { onView(withText(R.string.error_dialog_connectivity_title)).check(doesNotExist()); onView(withId(R.id.amount_label)).check(matches(withText(R.string.mobileConfirmDetailsAmount))); - onView(withId(R.id.amount_value)).check(matches(withText("102.00 USD"))); + onView(withId(R.id.amount_value)).check(matches(withText("$102.00 USD"))); onView(withId(R.id.fee_label)).check(matches(withText(R.string.mobileConfirmDetailsFee))); - onView(withId(R.id.fee_value)).check(matches(withText("2.00 USD"))); + onView(withId(R.id.fee_value)).check(matches(withText("$2.00 USD"))); onView(withId(R.id.transfer_label)).check(matches(withText(R.string.mobileConfirmDetailsTotal))); - onView(withId(R.id.transfer_value)).check(matches(withText("100.00 USD"))); + onView(withId(R.id.transfer_value)).check(matches(withText("$100.00 USD"))); } @Test @@ -830,11 +830,11 @@ public void onReceive(Context context, Intent intent) { onView(withId(R.id.transfer_action_button)).perform(nestedScrollTo(), click()); onView(withId(R.id.amount_label)).check(matches(withText(R.string.mobileConfirmDetailsAmount))); - onView(withId(R.id.amount_value)).check(matches(withText("102.00 USD"))); + onView(withId(R.id.amount_value)).check(matches(withText("$102.00 USD"))); onView(withId(R.id.fee_label)).check(matches(withText(R.string.mobileConfirmDetailsFee))); - onView(withId(R.id.fee_value)).check(matches(withText("2.00 USD"))); + onView(withId(R.id.fee_value)).check(matches(withText("$2.00 USD"))); onView(withId(R.id.transfer_label)).check(matches(withText(R.string.mobileConfirmDetailsTotal))); - onView(withId(R.id.transfer_value)).check(matches(withText("100.00 USD"))); + onView(withId(R.id.transfer_value)).check(matches(withText("$100.00 USD"))); onView(withId(R.id.notes_container)).check(matches(not(isDisplayed()))); onView(withId(R.id.notes_value)).check(matches(not(isDisplayed()))); @@ -873,9 +873,9 @@ private void verifyTransferConfirmationDialog(String transferType) { onView(ViewMatchers.withId(android.R.id.button1)).perform(click()); } - private String getAvailableFund(String amount, String currency) { + private String getAvailableFund(String symbol,String amount, String currency) { String availableFund = String.format(InstrumentationRegistry.getInstrumentation().getTargetContext() - .getString(R.string.mobileAvailableBalance), amount , currency); + .getString(R.string.mobileAvailableBalance), symbol,amount , currency); return availableFund; } } diff --git a/transferui/src/androidTest/java/com/hyperwallet/android/ui/transfer/TransferUserFundsTest.java b/transferui/src/androidTest/java/com/hyperwallet/android/ui/transfer/TransferUserFundsTest.java index 881d578a4..4c7f2713b 100644 --- a/transferui/src/androidTest/java/com/hyperwallet/android/ui/transfer/TransferUserFundsTest.java +++ b/transferui/src/androidTest/java/com/hyperwallet/android/ui/transfer/TransferUserFundsTest.java @@ -169,7 +169,7 @@ public void testTransferFunds_verifyTransferScreen() { onView(withId(R.id.transfer_all_funds)).perform(nestedScrollTo()).check(matches(isDisplayed())); onView(withId(R.id.transfer_all_funds)).check(matches(not(isSelected()))); onView(withId(R.id.transfer_summary)).perform(nestedScrollTo()).check(matches(isDisplayed())); - String availableFundUSD = getAvailableFund("998.00", "USD"); + String availableFundUSD = getAvailableFund("$","998.00", "USD"); onView(withId(R.id.transfer_summary)).check(matches(withText(availableFundUSD))); onView(withId(R.id.transfer_action_button)).perform(nestedScrollTo()); @@ -201,6 +201,7 @@ public void testTransferFunds_verifyTransferScreenAmountCurrencyFormatUSD() { onView(withId(R.id.transfer_all_funds)).perform(nestedScrollTo(), click()); // Assert 12 digits amount with currency format based on default locale + // onView(withId(R.id.transfer_amount)).check(matches(withText( USD_CURRENCY_SYMBOL + "1000,000,000.00"))); onView(withId(R.id.transfer_amount)).check(matches(withText( containsString("1,000,000,000.00")))); onView(withId(R.id.transfer_amount_currency)).check(matches(withText("USD"))); @@ -332,7 +333,7 @@ public void testTransferFunds_verifyDestinationUpdatedAfterAddingNewExternalAcco onView(withId(R.id.transfer_all_funds)).perform(nestedScrollTo()).check(matches(isDisplayed())); onView(withId(R.id.transfer_all_funds)).check(matches(not(isSelected()))); onView(withId(R.id.transfer_summary)).perform(nestedScrollTo()).check(matches(isDisplayed())); - String availableFundUSD = getAvailableFund("998.00", "USD"); + String availableFundUSD = getAvailableFund("$","998.00", "USD"); onView(withId(R.id.transfer_summary)).check(matches(withText(availableFundUSD))); onView(withId(R.id.transfer_action_button)).check(matches(isEnabled())); @@ -388,7 +389,7 @@ public void onReceive(Context context, Intent intent) { onView(withId(R.id.transfer_destination_description_2)).check(matches(withText("ending in 5121"))); onView(withId(R.id.transfer_summary)).perform(nestedScrollTo()).check(matches(isDisplayed())); - String availableFundCAD = getAvailableFund("1,157.40", "CAD"); + String availableFundCAD = getAvailableFund("$","1,157.40", "CAD"); onView(withId(R.id.transfer_summary)).check(matches(withText(availableFundCAD))); onView(withId(R.id.transfer_amount)).perform(nestedScrollTo(), replaceText("150.00")); @@ -400,24 +401,24 @@ public void onReceive(Context context, Intent intent) { matches(atPosition(0, hasDescendant( allOf(withId(R.id.sell_label), withText(R.string.mobileFXsell)))))); onView(withId(R.id.list_foreign_exchange)).check( - matches(atPosition(0, hasDescendant(allOf(withId(R.id.sell_value), withText("117.87 USD")))))); + matches(atPosition(0, hasDescendant(allOf(withId(R.id.sell_value), withText("$117.87 USD")))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(0, hasDescendant(allOf(withId(R.id.buy_label), withText(R.string.mobileFXbuy)))))); onView(withId(R.id.list_foreign_exchange)).check( - matches(atPosition(0, hasDescendant(allOf(withId(R.id.buy_value), withText("152.20 CAD")))))); + matches(atPosition(0, hasDescendant(allOf(withId(R.id.buy_value), withText("$152.20 CAD")))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(0, hasDescendant( allOf(withId(R.id.exchange_rate_label), withText(R.string.mobileFXRateLabel)))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(0, - hasDescendant(allOf(withId(R.id.exchange_rate_value), withText("1 USD = 1.291253 CAD")))))); + hasDescendant(allOf(withId(R.id.exchange_rate_value), withText("$1 USD = $1.291253 CAD")))))); onView(withId(R.id.amount_label)).check(matches(withText(R.string.mobileConfirmDetailsAmount))); - onView(withId(R.id.amount_value)).check(matches(withText("152.20 CAD"))); + onView(withId(R.id.amount_value)).check(matches(withText("$152.20 CAD"))); onView(withId(R.id.fee_label)).check(matches(withText(R.string.mobileConfirmDetailsFee))); - onView(withId(R.id.fee_value)).check(matches(withText("2.20 CAD"))); + onView(withId(R.id.fee_value)).check(matches(withText("$2.20 CAD"))); onView(withId(R.id.transfer_label)).check(matches(withText(R.string.mobileConfirmDetailsTotal))); - onView(withId(R.id.transfer_value)).check(matches(withText("150.00 CAD"))); + onView(withId(R.id.transfer_value)).check(matches(withText("$150.00 CAD"))); onView(withId(R.id.exchange_rate_warning_container)).check(matches(not(isDisplayed()))); onView(withId(R.id.exchange_rate_warning)).check(matches(not(isDisplayed()))); onView(withId(R.id.notes_container)).check(matches(not(isDisplayed()))); @@ -489,11 +490,11 @@ public void onReceive(Context context, Intent intent) { onView(withId(R.id.list_foreign_exchange)).check(matches(not(isDisplayed()))); onView(withId(R.id.amount_label)).check(matches(withText(R.string.mobileConfirmDetailsAmount))); - onView(withId(R.id.amount_value)).check(matches(withText("102.00 USD"))); + onView(withId(R.id.amount_value)).check(matches(withText("$102.00 USD"))); onView(withId(R.id.fee_label)).check(matches(withText(R.string.mobileConfirmDetailsFee))); - onView(withId(R.id.fee_value)).check(matches(withText("2.00 USD"))); + onView(withId(R.id.fee_value)).check(matches(withText("$2.00 USD"))); onView(withId(R.id.transfer_label)).check(matches(withText(R.string.mobileConfirmDetailsTotal))); - onView(withId(R.id.transfer_value)).check(matches(withText("100.00 USD"))); + onView(withId(R.id.transfer_value)).check(matches(withText("$100.00 USD"))); onView(withId(R.id.exchange_rate_warning_container)).check(matches(not(isDisplayed()))); onView(withId(R.id.exchange_rate_warning)).check(matches(not(isDisplayed()))); onView(withId(R.id.notes_container)).check(matches(not(isDisplayed()))); @@ -559,11 +560,11 @@ public void onReceive(Context context, Intent intent) { onView(withId(R.id.list_foreign_exchange)).check(matches(not(isDisplayed()))); onView(withId(R.id.amount_label)).check(matches(withText(R.string.mobileConfirmDetailsAmount))); - onView(withId(R.id.amount_value)).check(matches(withText("102.00 USD"))); + onView(withId(R.id.amount_value)).check(matches(withText("$102.00 USD"))); onView(withId(R.id.fee_label)).check(matches(withText(R.string.mobileConfirmDetailsFee))); - onView(withId(R.id.fee_value)).check(matches(withText("2.00 USD"))); + onView(withId(R.id.fee_value)).check(matches(withText("$2.00 USD"))); onView(withId(R.id.transfer_label)).check(matches(withText(R.string.mobileConfirmDetailsTotal))); - onView(withId(R.id.transfer_value)).check(matches(withText("100.00 USD"))); + onView(withId(R.id.transfer_value)).check(matches(withText("$100.00 USD"))); onView(withId(R.id.exchange_rate_warning_container)).check(matches(not(isDisplayed()))); onView(withId(R.id.exchange_rate_warning)).check(matches(not(isDisplayed()))); onView(withId(R.id.notes_container)).perform(nestedScrollTo()).check(matches(isDisplayed())); @@ -629,7 +630,7 @@ public void onReceive(Context context, Intent intent) { onView(withId(R.id.list_foreign_exchange)).check(matches(not(isDisplayed()))); onView(withId(R.id.amount_label)).check(matches(withText(R.string.mobileConfirmDetailsAmount))); - onView(withId(R.id.amount_value)).check(matches(withText("100.00 USD"))); + onView(withId(R.id.amount_value)).check(matches(withText("$100.00 USD"))); onView(withId(R.id.fee_label)).check(matches(not(isDisplayed()))); onView(withId(R.id.fee_value)).check(matches(not(isDisplayed()))); onView(withId(R.id.transfer_label)).check(matches(not(isDisplayed()))); @@ -704,42 +705,42 @@ public void onReceive(Context context, Intent intent) { matches(atPosition(0, hasDescendant( allOf(withId(R.id.sell_label), withText(R.string.mobileFXsell)))))); onView(withId(R.id.list_foreign_exchange)).check( - matches(atPosition(0, hasDescendant(allOf(withId(R.id.sell_value), withText("100.00 CAD")))))); + matches(atPosition(0, hasDescendant(allOf(withId(R.id.sell_value), withText("$100.00 CAD")))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(0, hasDescendant(allOf(withId(R.id.buy_label), withText(R.string.mobileFXbuy)))))); onView(withId(R.id.list_foreign_exchange)).check( - matches(atPosition(0, hasDescendant(allOf(withId(R.id.buy_value), withText("77.44 USD")))))); + matches(atPosition(0, hasDescendant(allOf(withId(R.id.buy_value), withText("$77.44 USD")))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(0, hasDescendant( allOf(withId(R.id.exchange_rate_label), withText(R.string.mobileFXRateLabel)))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(0, - hasDescendant(allOf(withId(R.id.exchange_rate_value), withText("1 CAD = 0.774400 USD")))))); + hasDescendant(allOf(withId(R.id.exchange_rate_value), withText("$1 CAD = $0.774400 USD")))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(1, hasDescendant( allOf(withId(R.id.sell_label), withText(R.string.mobileFXsell)))))); onView(withId(R.id.list_foreign_exchange)).check( - matches(atPosition(1, hasDescendant(allOf(withId(R.id.sell_value), withText("100.00 EUR")))))); + matches(atPosition(1, hasDescendant(allOf(withId(R.id.sell_value), withText("€100.00 EUR")))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(1, hasDescendant(allOf(withId(R.id.buy_label), withText(R.string.mobileFXbuy)))))); onView(withId(R.id.list_foreign_exchange)).check( - matches(atPosition(1, hasDescendant(allOf(withId(R.id.buy_value), withText("112.61 USD")))))); + matches(atPosition(1, hasDescendant(allOf(withId(R.id.buy_value), withText("$112.61 USD")))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(1, hasDescendant( allOf(withId(R.id.exchange_rate_label), withText(R.string.mobileFXRateLabel)))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(1, - hasDescendant(allOf(withId(R.id.exchange_rate_value), withText("1 EUR = 1.126100 USD")))))); + hasDescendant(allOf(withId(R.id.exchange_rate_value), withText("€1 EUR = $1.126100 USD")))))); onView(withId(R.id.amount_label)).check(matches(withText(R.string.mobileConfirmDetailsAmount))); - onView(withId(R.id.amount_value)).check(matches(withText("290.05 USD"))); + onView(withId(R.id.amount_value)).check(matches(withText("$290.05 USD"))); onView(withId(R.id.fee_label)).check(matches(withText(R.string.mobileConfirmDetailsFee))); - onView(withId(R.id.fee_value)).check(matches(withText("2.00 USD"))); + onView(withId(R.id.fee_value)).check(matches(withText("$2.00 USD"))); onView(withId(R.id.transfer_label)).check(matches(withText(R.string.mobileConfirmDetailsTotal))); - onView(withId(R.id.transfer_value)).check(matches(withText("288.05 USD"))); + onView(withId(R.id.transfer_value)).check(matches(withText("$288.05 USD"))); onView(withId(R.id.exchange_rate_warning_container)).check(matches(not(isDisplayed()))); onView(withId(R.id.exchange_rate_warning)).check(matches(not(isDisplayed()))); @@ -813,42 +814,42 @@ public void onReceive(Context context, Intent intent) { matches(atPosition(0, hasDescendant( allOf(withId(R.id.sell_label), withText(R.string.mobileFXsell)))))); onView(withId(R.id.list_foreign_exchange)).check( - matches(atPosition(0, hasDescendant(allOf(withId(R.id.sell_value), withText("100.00 CAD")))))); + matches(atPosition(0, hasDescendant(allOf(withId(R.id.sell_value), withText("$100.00 CAD")))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(0, hasDescendant(allOf(withId(R.id.buy_label), withText(R.string.mobileFXbuy)))))); onView(withId(R.id.list_foreign_exchange)).check( - matches(atPosition(0, hasDescendant(allOf(withId(R.id.buy_value), withText("78.44 USD")))))); + matches(atPosition(0, hasDescendant(allOf(withId(R.id.buy_value), withText("$78.44 USD")))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(0, hasDescendant( allOf(withId(R.id.exchange_rate_label), withText(R.string.mobileFXRateLabel)))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(0, - hasDescendant(allOf(withId(R.id.exchange_rate_value), withText("1 CAD = 0.784400 USD")))))); + hasDescendant(allOf(withId(R.id.exchange_rate_value), withText("$1 CAD = $0.784400 USD")))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(1, hasDescendant( allOf(withId(R.id.sell_label), withText(R.string.mobileFXsell)))))); onView(withId(R.id.list_foreign_exchange)).check( - matches(atPosition(1, hasDescendant(allOf(withId(R.id.sell_value), withText("100.00 EUR")))))); + matches(atPosition(1, hasDescendant(allOf(withId(R.id.sell_value), withText("€100.00 EUR")))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(1, hasDescendant(allOf(withId(R.id.buy_label), withText(R.string.mobileFXbuy)))))); onView(withId(R.id.list_foreign_exchange)).check( - matches(atPosition(1, hasDescendant(allOf(withId(R.id.buy_value), withText("113.61 USD")))))); + matches(atPosition(1, hasDescendant(allOf(withId(R.id.buy_value), withText("$113.61 USD")))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(1, hasDescendant( allOf(withId(R.id.exchange_rate_label), withText(R.string.mobileFXRateLabel)))))); onView(withId(R.id.list_foreign_exchange)).check( matches(atPosition(1, - hasDescendant(allOf(withId(R.id.exchange_rate_value), withText("1 EUR = 1.136100 USD")))))); + hasDescendant(allOf(withId(R.id.exchange_rate_value), withText("€1 EUR = $1.136100 USD")))))); onView(withId(R.id.amount_label)).check(matches(withText(R.string.mobileConfirmDetailsAmount))); - onView(withId(R.id.amount_value)).check(matches(withText("194.05 USD"))); + onView(withId(R.id.amount_value)).check(matches(withText("$194.05 USD"))); onView(withId(R.id.fee_label)).check(matches(withText(R.string.mobileConfirmDetailsFee))); - onView(withId(R.id.fee_value)).check(matches(withText("2.00 USD"))); + onView(withId(R.id.fee_value)).check(matches(withText("$2.00 USD"))); onView(withId(R.id.transfer_label)).check(matches(withText(R.string.mobileConfirmDetailsTotal))); - onView(withId(R.id.transfer_value)).check(matches(withText("192.05 USD"))); + onView(withId(R.id.transfer_value)).check(matches(withText("$192.05 USD"))); onView(withId(R.id.exchange_rate_warning)).perform(nestedScrollTo()); onView(withId(R.id.exchange_rate_warning)).perform(nestedScrollTo()).check(matches(isDisplayed())); onView(withId(R.id.exchange_rate_warning)).check( @@ -1039,7 +1040,7 @@ public void testTransferFunds_createTransferConnectionError() { onView(withId(android.R.id.button2)).check(matches(withText(R.string.cancelButtonLabel))); onView(withId(android.R.id.button1)).perform(click()); onView(withText(R.string.error_dialog_connectivity_title)).check(doesNotExist()); - String availableFundUSD = getAvailableFund("100.00", "USD"); + String availableFundUSD = getAvailableFund("$","100.00", "USD"); onView(withId(R.id.transfer_summary)).check(matches(withText(availableFundUSD))); } @@ -1066,11 +1067,11 @@ public void testTransferFunds_createTransferConfirmationConnectionErrorCancel() onView(withId(R.id.list_foreign_exchange)).check(matches(not(isDisplayed()))); onView(withId(R.id.amount_label)).check(matches(withText(R.string.mobileConfirmDetailsAmount))); - onView(withId(R.id.amount_value)).check(matches(withText("102.00 USD"))); + onView(withId(R.id.amount_value)).check(matches(withText("$102.00 USD"))); onView(withId(R.id.fee_label)).check(matches(withText(R.string.mobileConfirmDetailsFee))); - onView(withId(R.id.fee_value)).check(matches(withText("2.00 USD"))); + onView(withId(R.id.fee_value)).check(matches(withText("$2.00 USD"))); onView(withId(R.id.transfer_label)).check(matches(withText(R.string.mobileConfirmDetailsTotal))); - onView(withId(R.id.transfer_value)).check(matches(withText("100.00 USD"))); + onView(withId(R.id.transfer_value)).check(matches(withText("$100.00 USD"))); onView(withId(R.id.notes_container)).check(matches(not(isDisplayed()))); onView(withId(R.id.notes_value)).check(matches(not(isDisplayed()))); @@ -1132,11 +1133,11 @@ public void onReceive(Context context, Intent intent) { onView(withId(R.id.list_foreign_exchange)).check(matches(not(isDisplayed()))); onView(withId(R.id.amount_label)).check(matches(withText(R.string.mobileConfirmDetailsAmount))); - onView(withId(R.id.amount_value)).check(matches(withText("102.00 USD"))); + onView(withId(R.id.amount_value)).check(matches(withText("$102.00 USD"))); onView(withId(R.id.fee_label)).check(matches(withText(R.string.mobileConfirmDetailsFee))); - onView(withId(R.id.fee_value)).check(matches(withText("2.00 USD"))); + onView(withId(R.id.fee_value)).check(matches(withText("$2.00 USD"))); onView(withId(R.id.transfer_label)).check(matches(withText(R.string.mobileConfirmDetailsTotal))); - onView(withId(R.id.transfer_value)).check(matches(withText("100.00 USD"))); + onView(withId(R.id.transfer_value)).check(matches(withText("$100.00 USD"))); onView(withId(R.id.notes_container)).check(matches(not(isDisplayed()))); onView(withId(R.id.notes_value)).check(matches(not(isDisplayed()))); @@ -1434,9 +1435,9 @@ private void verifyTransferNoSourceDialog() { } - private String getAvailableFund(String amount, String currency) { + private String getAvailableFund(String symbol,String amount, String currency) { String availableFund = String.format(InstrumentationRegistry.getInstrumentation().getTargetContext() - .getString(R.string.mobileAvailableBalance), amount , currency); + .getString(R.string.mobileAvailableBalance),symbol, amount , currency); return availableFund; } diff --git a/transferui/src/main/java/com/hyperwallet/android/ui/transfer/view/CreateTransferFragment.java b/transferui/src/main/java/com/hyperwallet/android/ui/transfer/view/CreateTransferFragment.java index 12fb8f913..bbf7b8ff7 100644 --- a/transferui/src/main/java/com/hyperwallet/android/ui/transfer/view/CreateTransferFragment.java +++ b/transferui/src/main/java/com/hyperwallet/android/ui/transfer/view/CreateTransferFragment.java @@ -88,8 +88,8 @@ public class CreateTransferFragment extends Fragment { private static final String ELLIPSIS = "..."; private static final int NOTES_MAX_LINE_LENGTH = 40; private static final String REGEX_ONLY_NUMBER = "[^0-9]"; - private static final String REGEX_REMOVE_TRAILING_EMPTY_SPACE = "\\s+$"; - private static final String REGEX_ONLY_NUMBER_AND_DECIMAL = "[^0-9.]"; + private static final String REGEX_REMOVE_EMPTY_SPACE = "^\\s+|\\s+$"; + public static final String REGEX_ONLY_NUMBER_AND_DECIMAL = "[^0-9.]"; private static final String US_CURRENCY_CODE = "USD"; private static final String CURRENCY_FILE_NAME = "currency.json"; private final String CURRENCY_CODE = "currencycode"; @@ -366,21 +366,16 @@ public void onTextChanged(CharSequence s, int start, int before, int count) { if (cleanString.length() != 0) { double parsed = Double.parseDouble(cleanString); String formatted; - switch (mNumberOfFractionDigits) { - case 0: - formatted = formattedAmount(parsed, mCurrencyCode); - break; - case 1: - formatted = formattedAmount(parsed / 10, mCurrencyCode); - break; - case 2: - formatted = formattedAmount(parsed / 100, mCurrencyCode); - break; - case 3: - formatted = formattedAmount(parsed / 1000, mCurrencyCode); - break; - default: - formatted = ""; + int fractionalDenominator = 10; + if (mNumberOfFractionDigits > 1) { + for (int i = 1; i < mNumberOfFractionDigits; i++) { + fractionalDenominator *= 10; + } + } + if (mNumberOfFractionDigits == 0) { + formatted = formattedAmount(parsed, mCurrencyCode); + } else { + formatted = formattedAmount(parsed / fractionalDenominator, mCurrencyCode); } if (formatted.replaceAll(REGEX_ONLY_NUMBER, EMPTY_STRING).length() <= MAX_AMOUNT_WHOLE_NUMBER) { @@ -563,10 +558,6 @@ public void onChanged(final TransferMethod transferMethod) { @Override public void onChanged(TransferSource transferSource) { - mTransferAmount.setText(formattedAmount( - stringToDouble((String) getResources().getText(R.string.defaultTransferAmount)), - mCurrencyCode)); - showTransferSource(transferSource); } }); @@ -617,8 +608,11 @@ private void registerAvailableFundsObserver() { @Override public void onChanged(final Transfer transfer) { if (transfer != null) { + CurrencyDetails currencyDetails = getNumberOfFractionDigits(mCurrencyCode); String summary = requireContext().getString(R.string.mobileAvailableBalance, - transfer.getDestinationAmount(), transfer.getDestinationCurrency()); + currencyDetails == null ? "" : currencyDetails.getSymbol(), + formattedAmount(stringToDouble(transfer.getDestinationAmount()), mCurrencyCode), + transfer.getDestinationCurrency()); mTransferAllFundsSummary.setText(summary); mTransferAllFundsSummary.setVisibility(View.VISIBLE); if (mCreateTransferViewModel.isUpdateTransferAllFunds()) { @@ -766,7 +760,7 @@ private String formattedAmount(final double amount, final String currencyCode) { mGroupSeparator = Character.toString(decimalFormatSymbols.getGroupingSeparator()); mCreateTransferViewModel.setDecimalSeparator(mDecimalSeparator); mCreateTransferViewModel.setGroupSeparator(mGroupSeparator); - return currencyFormatter.format(amount).replaceAll(REGEX_REMOVE_TRAILING_EMPTY_SPACE, EMPTY_STRING); + return currencyFormatter.format(amount).replaceAll(REGEX_REMOVE_EMPTY_SPACE, EMPTY_STRING); } private double stringToDouble(@NonNull final String amount) { diff --git a/transferui/src/main/java/com/hyperwallet/android/ui/transfer/view/ScheduleTransferFragment.java b/transferui/src/main/java/com/hyperwallet/android/ui/transfer/view/ScheduleTransferFragment.java index 6c60916da..cc5b489ec 100644 --- a/transferui/src/main/java/com/hyperwallet/android/ui/transfer/view/ScheduleTransferFragment.java +++ b/transferui/src/main/java/com/hyperwallet/android/ui/transfer/view/ScheduleTransferFragment.java @@ -16,6 +16,7 @@ */ package com.hyperwallet.android.ui.transfer.view; +import static com.hyperwallet.android.model.transfer.Transfer.EMPTY_STRING; import static com.hyperwallet.android.model.transfermethod.TransferMethod.TransferMethodFields.TRANSFER_METHOD_COUNTRY; import static com.hyperwallet.android.model.transfermethod.TransferMethod.TransferMethodFields.TYPE; import static com.hyperwallet.android.model.transfermethod.TransferMethod.TransferMethodTypes.PREPAID_CARD; @@ -23,6 +24,7 @@ import static com.hyperwallet.android.ui.common.view.TransferMethodUtils.getStringResourceByName; import static com.hyperwallet.android.ui.common.view.TransferMethodUtils.getTransferMethodDetail; import static com.hyperwallet.android.ui.common.view.TransferMethodUtils.getTransferMethodName; +import static com.hyperwallet.android.ui.transfer.view.CreateTransferFragment.REGEX_ONLY_NUMBER_AND_DECIMAL; import android.os.Build; import android.os.Bundle; @@ -43,11 +45,14 @@ import androidx.recyclerview.widget.RecyclerView; import com.hyperwallet.android.model.transfer.ForeignExchange; +import com.hyperwallet.android.ui.common.util.CurrencyDetails; +import com.hyperwallet.android.ui.common.util.CurrencyParser; import com.hyperwallet.android.ui.common.view.OneClickListener; import com.hyperwallet.android.ui.transfer.R; import com.hyperwallet.android.ui.transfer.TransferSource; import com.hyperwallet.android.ui.transfer.viewmodel.ScheduleTransferViewModel; +import java.util.Currency; import java.util.List; import java.util.Locale; @@ -180,21 +185,37 @@ private void showSummary() { feeContainer.setVisibility(View.VISIBLE); receiveAmountContainer.setVisibility(View.VISIBLE); amountHorizontalBar.setVisibility(View.VISIBLE); + String feeFormattedValue = CurrencyParser.getInstance(requireContext()).formatCurrencyWithSymbol( + mScheduleTransferViewModel.getTransfer().getDestinationCurrency(), + mScheduleTransferViewModel.getTransfer().getDestinationFeeAmount().replaceAll( + REGEX_ONLY_NUMBER_AND_DECIMAL, EMPTY_STRING)); + String amountFormattedValue = CurrencyParser.getInstance(requireContext()).formatCurrencyWithSymbol( + mScheduleTransferViewModel.getTransfer().getDestinationCurrency(), + mScheduleTransferViewModel.getTransferTotalAmount().replaceAll(REGEX_ONLY_NUMBER_AND_DECIMAL, + EMPTY_STRING)); + String receiveAmountFormattedValue = CurrencyParser.getInstance(requireContext()).formatCurrencyWithSymbol( + mScheduleTransferViewModel.getTransfer().getDestinationCurrency(), + mScheduleTransferViewModel.getTransfer().getDestinationAmount().replaceAll( + REGEX_ONLY_NUMBER_AND_DECIMAL, EMPTY_STRING)); fee.setText(requireContext().getString(R.string.amount_currency_format, - mScheduleTransferViewModel.getTransfer().getDestinationFeeAmount(), + feeFormattedValue, mScheduleTransferViewModel.getTransfer().getDestinationCurrency())); amount.setText(requireContext().getString(R.string.amount_currency_format, - mScheduleTransferViewModel.getTransferTotalAmount(), + amountFormattedValue, mScheduleTransferViewModel.getTransfer().getDestinationCurrency())); receiveAmount.setText(requireContext().getString(R.string.amount_currency_format, - mScheduleTransferViewModel.getTransfer().getDestinationAmount(), + receiveAmountFormattedValue, mScheduleTransferViewModel.getTransfer().getDestinationCurrency())); } else { feeContainer.setVisibility(View.GONE); receiveAmountContainer.setVisibility(View.GONE); amountHorizontalBar.setVisibility(View.GONE); + String amountFormattedValue = CurrencyParser.getInstance(requireContext()).formatCurrencyWithSymbol( + mScheduleTransferViewModel.getTransfer().getDestinationCurrency(), + mScheduleTransferViewModel.getTransfer().getDestinationAmount().replaceAll( + REGEX_ONLY_NUMBER_AND_DECIMAL, EMPTY_STRING)); amount.setText(requireContext().getString(R.string.amount_currency_format, - mScheduleTransferViewModel.getTransfer().getDestinationAmount(), + amountFormattedValue, mScheduleTransferViewModel.getTransfer().getDestinationCurrency())); } @@ -291,12 +312,22 @@ void bind(@NonNull final ForeignExchange fx) { TextView buyValue = itemView.findViewById(R.id.buy_value); TextView exchangeRateValue = itemView.findViewById(R.id.exchange_rate_value); + String sellFormattedAmount= CurrencyParser.getInstance(itemView.getContext()).formatCurrencyWithSymbol( + fx.getSourceCurrency(), fx.getSourceAmount().replaceAll( + REGEX_ONLY_NUMBER_AND_DECIMAL, EMPTY_STRING)); + + String buyFormattedAmount= CurrencyParser.getInstance(itemView.getContext()).formatCurrencyWithSymbol( + fx.getDestinationCurrency(), fx.getDestinationAmount().replaceAll( + REGEX_ONLY_NUMBER_AND_DECIMAL, EMPTY_STRING)); + + CurrencyDetails sourceCurrency = CurrencyParser.getInstance(itemView.getContext()).getCurrency(fx.getSourceCurrency()); + CurrencyDetails destinationCurrency = CurrencyParser.getInstance(itemView.getContext()).getCurrency(fx.getDestinationCurrency()); sellValue.setText(itemView.getContext().getString(R.string.amount_currency_format, - fx.getSourceAmount(), fx.getSourceCurrency())); + sellFormattedAmount, fx.getSourceCurrency())); buyValue.setText(itemView.getContext().getString(R.string.amount_currency_format, - fx.getDestinationAmount(), fx.getDestinationCurrency())); + buyFormattedAmount, fx.getDestinationCurrency())); exchangeRateValue.setText(itemView.getContext().getString(R.string.exchange_rate_format, - fx.getSourceCurrency(), fx.getRate(), fx.getDestinationCurrency())); + sourceCurrency.getSymbol(),fx.getSourceCurrency(), destinationCurrency.getSymbol(),fx.getRate(), fx.getDestinationCurrency())); } } } diff --git a/transferui/src/main/res/layout/foreign_exchange.xml b/transferui/src/main/res/layout/foreign_exchange.xml index 20ef7bb1a..8ce465d7d 100644 --- a/transferui/src/main/res/layout/foreign_exchange.xml +++ b/transferui/src/main/res/layout/foreign_exchange.xml @@ -37,6 +37,7 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" + android:textDirection="ltr" tools:text="@string/foreign_exchange_sell_placeholder"/> USD $ Максимална сума за трансфер - Налична сума: %s %s + Налична сума: %s %s %s РЕЗЮМЕ Забележка Забележка @@ -28,7 +28,6 @@ Местоназначение %s %s - 1 %s = %s %s Не можете да въведете метод за трансфер. Въведете валидна сума за трансфер diff --git a/transferui/src/main/res/values-cs/strings.xml b/transferui/src/main/res/values-cs/strings.xml index 71fe9cf16..3c7399be5 100644 --- a/transferui/src/main/res/values-cs/strings.xml +++ b/transferui/src/main/res/values-cs/strings.xml @@ -12,7 +12,7 @@ USD $ Maximální převáděná částka - Dostupná částka: %s %s + Dostupná částka: %s %s %s SHRNUTÍ Poznámka Poznámka @@ -28,7 +28,6 @@ Položka místa určení %s %s - 1 %s = %s %s Nemůžete přidat způsob převodu. Zadejte platnou částku pro převod diff --git a/transferui/src/main/res/values-de/strings.xml b/transferui/src/main/res/values-de/strings.xml index 18f29e317..4e11b8127 100644 --- a/transferui/src/main/res/values-de/strings.xml +++ b/transferui/src/main/res/values-de/strings.xml @@ -12,7 +12,7 @@ USD $ Höchstbetrag überweisen - Verfügbarer Betrag: %s %s + Verfügbarer Betrag: %s %s %s ZUSAMMENFASSUNG Anmerkung Anmerkung @@ -28,7 +28,6 @@ Zielelement %s %s - 1 %s = %s %s Sie können keine Überweisungsmethode hinzufügen. Geben Sie einen gültigen Überweisungsbetrag ein. diff --git a/transferui/src/main/res/values-el/strings.xml b/transferui/src/main/res/values-el/strings.xml index 6062cb982..bcd474d20 100644 --- a/transferui/src/main/res/values-el/strings.xml +++ b/transferui/src/main/res/values-el/strings.xml @@ -12,7 +12,7 @@ USD $ Μέγιστο ποσό μεταφοράς - Διαθέσιμο ποσό: %s %s + Διαθέσιμο ποσό: %s %s %s ΣΥΝΟΨΗ Σημείωση Σημείωση @@ -28,7 +28,6 @@ Στοιχείο προορισμού %s %s - 1 %s = %s %s Δεν μπορείτε να προσθέσετε έναν τρόπο μεταφοράς. Εισαγάγετε ένα έγκυρο ποσό μεταφοράς diff --git a/transferui/src/main/res/values-es/strings.xml b/transferui/src/main/res/values-es/strings.xml index e5119ab12..e16028583 100644 --- a/transferui/src/main/res/values-es/strings.xml +++ b/transferui/src/main/res/values-es/strings.xml @@ -12,7 +12,7 @@ USD $ Importe máximo de transferencia - Importe disponible: %s %s + Importe disponible: %s %s %s RESUMEN Nota Nota @@ -28,7 +28,6 @@ Elemento de destino %s %s - 1 %s = %s %s No puede añadir un método de transferencia. Introduzca un importe de transferencia válido diff --git a/transferui/src/main/res/values-fi/strings.xml b/transferui/src/main/res/values-fi/strings.xml index a46610be1..f3fd59833 100644 --- a/transferui/src/main/res/values-fi/strings.xml +++ b/transferui/src/main/res/values-fi/strings.xml @@ -12,7 +12,7 @@ USD $ Siirrä suurin sallittu summa - Käytettävissä oleva summa: %s %s + Käytettävissä oleva summa: %s %s %s YHTEENVETO Huomautus Huomautus @@ -28,7 +28,6 @@ Kohde %s %s - 1 %s = %s %s Et pysty lisäämään siirtomenetelmää. Syötä kelvollinen siirrettävä summa diff --git a/transferui/src/main/res/values-fr/strings.xml b/transferui/src/main/res/values-fr/strings.xml index 5f178eb01..6a6f35421 100644 --- a/transferui/src/main/res/values-fr/strings.xml +++ b/transferui/src/main/res/values-fr/strings.xml @@ -12,7 +12,7 @@ USD $ Montant max. de transfert - Montant disponible : %s %s + Montant disponible : %s %s %s RÉCAPITULATIF Note Note @@ -28,7 +28,6 @@ Destination %s %s - 1 %s = %s %s Vous ne pouvez pas ajouter de méthode de transfert. Veuillez saisir un montant de transfert valide diff --git a/transferui/src/main/res/values-hr/strings.xml b/transferui/src/main/res/values-hr/strings.xml index f2491e547..791cf812b 100644 --- a/transferui/src/main/res/values-hr/strings.xml +++ b/transferui/src/main/res/values-hr/strings.xml @@ -12,7 +12,7 @@ USD $ Maksimalni iznos za prijenos - Dostupan iznos: %s %s + Dostupan iznos: %s %s %s SPECIFIKACIJA Napomena Napomena @@ -28,7 +28,6 @@ Odredišna stavka %s %s - 1 %s = %s %s Ne\'možete dodati način prijenosa. Unesite valjani iznos prijenosa diff --git a/transferui/src/main/res/values-hu/strings.xml b/transferui/src/main/res/values-hu/strings.xml index 3f8b2ac0c..368748c24 100644 --- a/transferui/src/main/res/values-hu/strings.xml +++ b/transferui/src/main/res/values-hu/strings.xml @@ -12,7 +12,7 @@ USD $ Max. összeg átutalása - Elérhető összeg: %s %s + Elérhető összeg: %s %s %s ÖSSZEGZÉS Megjegyzés Megjegyzés @@ -28,7 +28,6 @@ Célszámla elem %s %s - 1 %s = %s %s Önnek nem áll módjában átutalási módot hozzáadni. Adjon meg egy érvényes átutalási összeget diff --git a/transferui/src/main/res/values-in/strings.xml b/transferui/src/main/res/values-in/strings.xml index 75f637a10..5bf4888fb 100644 --- a/transferui/src/main/res/values-in/strings.xml +++ b/transferui/src/main/res/values-in/strings.xml @@ -12,7 +12,7 @@ USD $ Jumlah maks transfer - Jumlah yang tersedia: %s %s + Jumlah yang tersedia: %s %s %s RINGKASAN Catatan Catatan @@ -28,7 +28,6 @@ Item tujuan %s %s - 1 %s = %s %s Anda\' tidak dapat menambah metode transfer. Masukkan jumlah transfer yang valid diff --git a/transferui/src/main/res/values-is/strings.xml b/transferui/src/main/res/values-is/strings.xml index 5f45c0b96..c3d48f523 100644 --- a/transferui/src/main/res/values-is/strings.xml +++ b/transferui/src/main/res/values-is/strings.xml @@ -12,7 +12,7 @@ USD $ Millifæra hámarksfjárhæð - Tiltæk fjárhæð: %s %s + Tiltæk fjárhæð: %s %s %s SAMANTEKT Skýring Skýring @@ -28,7 +28,6 @@ Viðtökustaður hlutur %s %s - 1 %s = %s %s Þú getur ekki bætt við millifærsluaðferð. Sláðu inn gilda millifærslufjárhæð diff --git a/transferui/src/main/res/values-it/strings.xml b/transferui/src/main/res/values-it/strings.xml index 2ec3e0367..f82c58ba1 100644 --- a/transferui/src/main/res/values-it/strings.xml +++ b/transferui/src/main/res/values-it/strings.xml @@ -12,7 +12,7 @@ USD $ Importo max. trasferimento - Importo disponibile: %s %s + Importo disponibile: %s %s %s RIEPILOGO Nota Nota @@ -28,7 +28,6 @@ Elemento destinazione %s %s - 1 %s = %s %s Non puoi aggiungere un metodo di trasferimento. Inserisci un importo valido per il trasferimento diff --git a/transferui/src/main/res/values-ja/strings.xml b/transferui/src/main/res/values-ja/strings.xml index aec9eafd7..154efb22f 100644 --- a/transferui/src/main/res/values-ja/strings.xml +++ b/transferui/src/main/res/values-ja/strings.xml @@ -12,7 +12,7 @@ 米ドル $ 最大送金額 - 利用可能額:%s %s + 利用可能額:%s %s %s 明細 @@ -28,7 +28,6 @@ 宛先アイテム %s %s - 1 %s = %s %s 送金方法を追加できません。 有効な送金額を入力する diff --git a/transferui/src/main/res/values-ko/strings.xml b/transferui/src/main/res/values-ko/strings.xml index 994b3c3b3..98323211b 100644 --- a/transferui/src/main/res/values-ko/strings.xml +++ b/transferui/src/main/res/values-ko/strings.xml @@ -12,7 +12,7 @@ USD $ 최대 이체 금액 - 사용 가능한 금액: %s %s + 사용 가능한 금액: %s %s %s 요약 참고 참고 @@ -28,7 +28,6 @@ 수취인 항목 %s %s - 1 %s = %s %s 이체 방법을 추가할 수 없습니다. 유효한 이체 금액을 입력하십시오 diff --git a/transferui/src/main/res/values-lv/strings.xml b/transferui/src/main/res/values-lv/strings.xml index 6e2a29603..36ebae4f9 100644 --- a/transferui/src/main/res/values-lv/strings.xml +++ b/transferui/src/main/res/values-lv/strings.xml @@ -12,7 +12,7 @@ USD $ Pārskaitīt maksimālo summu - Pieejamā summa: %s %s + Pieejamā summa: %s %s %s KOPSAVILKUMS Piezīme Piezīme @@ -28,7 +28,6 @@ Galamērķa vienums %s %s - 1 %s = %s %s Jūs nevarat pievienot pārskaitījuma veidu. Ievadiet derīgu pārskaitījuma summu diff --git a/transferui/src/main/res/values-mk/strings.xml b/transferui/src/main/res/values-mk/strings.xml index fc4bdd425..967842ede 100644 --- a/transferui/src/main/res/values-mk/strings.xml +++ b/transferui/src/main/res/values-mk/strings.xml @@ -12,7 +12,7 @@ USD $ Префрли максимален износ - Достапен износ: %s %s + Достапен износ: %s %s %s РЕЗИМЕ Забелешка Забелешка @@ -28,7 +28,6 @@ Крајна ставка %s %s - 1 %s = %s %s Не\'можете да додадете метод на трансфер. Внеси важечки износ на трансфер diff --git a/transferui/src/main/res/values-mn/strings.xml b/transferui/src/main/res/values-mn/strings.xml index 6bf882c1e..fb938d95f 100644 --- a/transferui/src/main/res/values-mn/strings.xml +++ b/transferui/src/main/res/values-mn/strings.xml @@ -12,7 +12,7 @@ ам.доллар $ Шилжүүлгийн хамгийн их дүн - Боломжтой дүн: %s %s + Боломжтой дүн: %s %s %s ХУРААНГУЙ Анхаар Анхаар @@ -28,7 +28,6 @@ Хүлээн авах зүйл %s %s - 1 %s = %s %s Та шилжүүлгийн аргыг нэмэх боломжгүй. Зөв шилжүүлгийн дүнг оруулна уу diff --git a/transferui/src/main/res/values-ms/strings.xml b/transferui/src/main/res/values-ms/strings.xml index fa8301700..26b76f064 100644 --- a/transferui/src/main/res/values-ms/strings.xml +++ b/transferui/src/main/res/values-ms/strings.xml @@ -12,7 +12,7 @@ ASD $ Pindah jumlah maks - Jumlah yang tersedia: %s %s + Jumlah yang tersedia: %s %s %s RINGKASAN Nota Nota @@ -28,7 +28,6 @@ Item destinasi %s %s - 1 %s = %s %s Anda tidak boleh menambah kaedah pemindahan. Masukkan jumlah pemindahan yang sah diff --git a/transferui/src/main/res/values-nl/strings.xml b/transferui/src/main/res/values-nl/strings.xml index c4a4f2f7b..dbdf930bf 100644 --- a/transferui/src/main/res/values-nl/strings.xml +++ b/transferui/src/main/res/values-nl/strings.xml @@ -12,7 +12,7 @@ USD $ Max. bedrag overboeken - Beschikbaar bedrag: %s %s + Beschikbaar bedrag: %s %s %s SAMENVATTING Opmerking Opmerking @@ -28,7 +28,6 @@ Item bestemming %s %s - 1 %s = %s %s U kunt geen overboekingsmethode toevoegen. Voer een geldig overboekingsbedrag in diff --git a/transferui/src/main/res/values-pl/strings.xml b/transferui/src/main/res/values-pl/strings.xml index dcd0b778d..39740660d 100644 --- a/transferui/src/main/res/values-pl/strings.xml +++ b/transferui/src/main/res/values-pl/strings.xml @@ -12,7 +12,7 @@ USD $ Maks. kwota przelewu - Dostępna kwota: %s %s + Dostępna kwota: %s %s %s PODSUMOWANIE Uwaga Uwaga @@ -28,7 +28,6 @@ Pozycja dotycząca miejsca docelowego %s %s - 1 %s = %s %s Nie możesz dodać metody przelewu. Wpisz prawidłową kwotę przelewu diff --git a/transferui/src/main/res/values-pt-rPT/strings.xml b/transferui/src/main/res/values-pt-rPT/strings.xml index 3d1669db6..6ef312447 100644 --- a/transferui/src/main/res/values-pt-rPT/strings.xml +++ b/transferui/src/main/res/values-pt-rPT/strings.xml @@ -12,7 +12,7 @@ USD $ Quantidade máxima de transferência - Quantia disponível: %s %s + Quantia disponível: %s %s %s RESUMO Nota Nota @@ -28,7 +28,6 @@ Item de destino %s %s - 1 %s = %s %s Não pode adicionar um método de transferência. Insira um valor de transferência válido diff --git a/transferui/src/main/res/values-pt/strings.xml b/transferui/src/main/res/values-pt/strings.xml index 3aa8c4d59..45e212b00 100644 --- a/transferui/src/main/res/values-pt/strings.xml +++ b/transferui/src/main/res/values-pt/strings.xml @@ -12,7 +12,7 @@ USD $ Quantidade máxima para transferência - Valor disponível:%s %s + Valor disponível:%s %s %s RESUMO Observação Observação @@ -28,7 +28,6 @@ Item do favorecido %s %s - 1 %s = %s %s Você não pode adicionar um método de transferência. Insira um valor válido para transferência diff --git a/transferui/src/main/res/values-ro/strings.xml b/transferui/src/main/res/values-ro/strings.xml index 278ea59bb..b72ced996 100644 --- a/transferui/src/main/res/values-ro/strings.xml +++ b/transferui/src/main/res/values-ro/strings.xml @@ -12,7 +12,7 @@ USD $ Suma maximă de transfer - Sumă disponibilă: %s %s + Sumă disponibilă: %s %s %s SUMAR Notă Notă @@ -28,7 +28,6 @@ Element de destinație %s %s - 1 %s = %s %s Nu puteți adăuga o metodă de transfer. Introduceți o sumă de transfer validă diff --git a/transferui/src/main/res/values-ru/strings.xml b/transferui/src/main/res/values-ru/strings.xml index 5f5a6e70b..4b98d322d 100644 --- a/transferui/src/main/res/values-ru/strings.xml +++ b/transferui/src/main/res/values-ru/strings.xml @@ -12,7 +12,7 @@ Долларов США $ Максимальная сумма перевода - Доступная сумма: %s %s + Доступная сумма: %s %s %s КРАТКАЯ ИНФОРМАЦИЯ Примечание Примечание @@ -28,7 +28,6 @@ Позиция назначения %s %s - 1 %s = %s %s Вы не можете добавить способ перевода. Введите действительную сумму перевода diff --git a/transferui/src/main/res/values-sk/strings.xml b/transferui/src/main/res/values-sk/strings.xml index ad257398c..c3332ceb7 100644 --- a/transferui/src/main/res/values-sk/strings.xml +++ b/transferui/src/main/res/values-sk/strings.xml @@ -12,7 +12,7 @@ USD $ Max. suma prevodu - Disponibilná suma: %s %s + Disponibilná suma: %s %s %s ZHRNUTIE Poznámka Poznámka @@ -28,7 +28,6 @@ Položka destinácie %s %s - 1 %s = %s %s Nemôžete pridať spôsob prevodu. Zadajte platnú sumu prevodu diff --git a/transferui/src/main/res/values-sl/strings.xml b/transferui/src/main/res/values-sl/strings.xml index 80868e560..05c81d4df 100644 --- a/transferui/src/main/res/values-sl/strings.xml +++ b/transferui/src/main/res/values-sl/strings.xml @@ -12,7 +12,7 @@ USD $ Prenesi najvišji možni znesek - Znesek na voljo: %s%s + Znesek na voljo: %s %s %s POVZETEK Opomba Opomba @@ -28,7 +28,6 @@ Postavka Namembni cilj %s %s - 1 %s = %s %s Ne morete dodati načina prenosa. Vnesite veljavni znesek prenosa diff --git a/transferui/src/main/res/values-sv/strings.xml b/transferui/src/main/res/values-sv/strings.xml index 7e966a39e..be74a75f5 100644 --- a/transferui/src/main/res/values-sv/strings.xml +++ b/transferui/src/main/res/values-sv/strings.xml @@ -12,7 +12,7 @@ USD $ Överför maxbelopp - Tillgängligt belopp: %s %s + Tillgängligt belopp: %s %s %s SAMMANFATTNING Anteckning Anteckning @@ -28,7 +28,6 @@ Destinationsobjekt %s %s - 1 %s = %s %s Du kan inte lägga till en överföringsmetod. Ange ett giltigt överföringsbelopp diff --git a/transferui/src/main/res/values-th/strings.xml b/transferui/src/main/res/values-th/strings.xml index 06cb0387c..b2985c608 100644 --- a/transferui/src/main/res/values-th/strings.xml +++ b/transferui/src/main/res/values-th/strings.xml @@ -12,7 +12,7 @@ ดอลลาร์สหรัฐ $ จำนวนเงินที่โอนได้สูงสุด - จำนวนเงินที่ใช้ได้: %s %s + จำนวนเงินที่ใช้ได้: %s %s %s สรุป หมายเหตุ หมายเหตุ @@ -28,7 +28,6 @@ รายการปลายทาง %s %s - 1 %s = %s %s คุณ\'ไม่สามารถเพิ่มวิธีการโอนเงินได้ ป้อนจำนวนเงินที่ต้องการโอนที่ถูกต้อง diff --git a/transferui/src/main/res/values-tr/strings.xml b/transferui/src/main/res/values-tr/strings.xml index ed0a4fd4d..bc1cdf9f4 100644 --- a/transferui/src/main/res/values-tr/strings.xml +++ b/transferui/src/main/res/values-tr/strings.xml @@ -12,7 +12,7 @@ USD $ En yüksek miktarı aktar - Mevcut miktar: %s %s + Mevcut miktar: %s %s %s ÖZET Not Not @@ -28,7 +28,6 @@ Gideceği yer %s %s - 1 %s = %s %s Bir\' aktarım yöntemi ekleyemediniz. Geçerli bir aktarım tutarı gir diff --git a/transferui/src/main/res/values-uk/strings.xml b/transferui/src/main/res/values-uk/strings.xml index 2f74509e4..855de550b 100644 --- a/transferui/src/main/res/values-uk/strings.xml +++ b/transferui/src/main/res/values-uk/strings.xml @@ -12,7 +12,7 @@ USD $ Макс. сума переказу - Доступна сума: %s %s + Доступна сума: %s %s %s ПІДСУМОК Примітка. Примітка. @@ -28,7 +28,6 @@ Елемент призначення %s %s - 1 %s = %s %s Ви не можете додати спосіб переказу. Введіть дійсну суму для переказу diff --git a/transferui/src/main/res/values-vi/strings.xml b/transferui/src/main/res/values-vi/strings.xml index 87f08a4ed..62240efa9 100644 --- a/transferui/src/main/res/values-vi/strings.xml +++ b/transferui/src/main/res/values-vi/strings.xml @@ -12,7 +12,7 @@ USD $ Chuyển số tiền tối đa - Số tiền khả dụng: %s %s + Số tiền khả dụng: %s %s %s TÓM LƯỢC Lưu ý Lưu ý @@ -28,7 +28,6 @@ Mục nơi đến %s %s - 1 %s = %s %s Bạn\'không thể thêm một phương thức chuyển tiền. Nhập số tiền chuyển hợp lệ diff --git a/transferui/src/main/res/values-zh-rCN/strings.xml b/transferui/src/main/res/values-zh-rCN/strings.xml index 20437c899..dd531fcbe 100644 --- a/transferui/src/main/res/values-zh-rCN/strings.xml +++ b/transferui/src/main/res/values-zh-rCN/strings.xml @@ -12,7 +12,7 @@ 美元 $ 最高转账限额 - 可用金额:%s %s + 可用金额:%s %s %s 总结 @@ -28,7 +28,6 @@ 目的项 %s %s - 1 %s = %s %s 您无法添加转账方式。\' 请输入有效转账金额 diff --git a/transferui/src/main/res/values-zh-rTW/strings.xml b/transferui/src/main/res/values-zh-rTW/strings.xml index a9fd24831..cd506dad7 100644 --- a/transferui/src/main/res/values-zh-rTW/strings.xml +++ b/transferui/src/main/res/values-zh-rTW/strings.xml @@ -12,7 +12,7 @@ 美元 $ 最高轉帳金額 - 可用金額:%s %s + 可用金額:%s %s %s 摘要 附註 附註 @@ -28,7 +28,6 @@ 目的地項目 %s %s - 1 %s = %s %s 您無法新增轉帳方式。 請輸入有效的轉帳金額 diff --git a/transferui/src/main/res/values-zh/strings.xml b/transferui/src/main/res/values-zh/strings.xml index a9fd24831..cd506dad7 100644 --- a/transferui/src/main/res/values-zh/strings.xml +++ b/transferui/src/main/res/values-zh/strings.xml @@ -12,7 +12,7 @@ 美元 $ 最高轉帳金額 - 可用金額:%s %s + 可用金額:%s %s %s 摘要 附註 附註 @@ -28,7 +28,6 @@ 目的地項目 %s %s - 1 %s = %s %s 您無法新增轉帳方式。 請輸入有效的轉帳金額 diff --git a/transferui/src/main/res/values/strings.xml b/transferui/src/main/res/values/strings.xml index 5df107716..b5df0b053 100644 --- a/transferui/src/main/res/values/strings.xml +++ b/transferui/src/main/res/values/strings.xml @@ -12,7 +12,7 @@ USD $ Transfer max amount - Amount available: %s %s + Amount available: %s %s %s SUMMARY Note Note @@ -28,7 +28,7 @@ Destination item %s %s - 1 %s = %s %s + %s1 %s = %s%s %s You\'re not able to add a transfer method. Enter a valid transfer amount