Browse Source

latest issue fixes

new_design
Mohan Shiwakoti 1 year ago
parent
commit
a9c58e9740
  1. 85
      app/src/main/java/com/remit/jmecustomer/features/exrate/gateway/ExchangeRateGateway.java
  2. 1
      app/src/main/java/com/remit/jmecustomer/features/kyc/newCustomer/gateway/KYCV3Gateway.java
  3. 50
      app/src/main/java/com/remit/jmecustomer/features/kyc/newCustomer/presenter/KYCV3ViewModel.java
  4. 91
      app/src/main/res/layout/fragment_amount_detail_send_money_v2.xml
  5. 2
      app/src/main/res/layout/fragment_choose_kyc.xml
  6. 2
      app/src/main/res/values-bn/strings.xml
  7. 2
      app/src/main/res/values-ja/strings.xml
  8. 2
      app/src/main/res/values-ne/strings.xml
  9. 2
      app/src/main/res/values-si/strings.xml
  10. 2
      app/src/main/res/values-vi/strings.xml
  11. 1
      app/src/main/res/values/styles.xml

85
app/src/main/java/com/remit/jmecustomer/features/exrate/gateway/ExchangeRateGateway.java

@ -19,25 +19,28 @@ import static com.remit.jmecustomer.base.PrefKeys.USER_PREFERRED_COUNTRY_CODE;
public class ExchangeRateGateway extends PrivilegedGateway implements ExchangeRateInteractorInterface.ExchangeRateGatewayInterface {
@Override
public Observable<ExchangeCalculationApiResponse> sendDataForForexCalculation(String auth, String senderCountryId, String senderCurrency, String recieverCurrency,
String senderAmount, String recieverAmount, String paymentMethodId,
String calculationPreference, String recipientCountryName, String recieverCountryId) {
JsonObject jsonObject=new JsonObject();
jsonObject.addProperty("sCountry",senderCountryId);
jsonObject.addProperty("sCurrency",senderCurrency);
jsonObject.addProperty("pCurrency",recieverCurrency);
jsonObject.addProperty("calcBy",calculationPreference);
jsonObject.addProperty("cAmount",senderAmount);
jsonObject.addProperty("pAmount",recieverAmount);
jsonObject.addProperty("serviceType",paymentMethodId);
jsonObject.addProperty("pCountry",recieverCountryId);
jsonObject.addProperty("pCountryName",recipientCountryName);
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("sCountry", senderCountryId);
jsonObject.addProperty("sCurrency", senderCurrency);
jsonObject.addProperty("pCurrency", recieverCurrency);
jsonObject.addProperty("calcBy", calculationPreference);
jsonObject.addProperty("cAmount", senderAmount);
jsonObject.addProperty("pAmount", recieverAmount);
jsonObject.addProperty("serviceType", paymentMethodId);
jsonObject.addProperty("pCountry", recieverCountryId);
jsonObject.addProperty("pCountryName", recipientCountryName);
if (!getUserIDNumber().isEmpty()) {
jsonObject.addProperty("userId", getUserID());
}
return HttpClientV2.getInstance().calculateExchangeRateV2(auth,jsonObject);
return HttpClientV2.getInstance().calculateExchangeRateV2(auth, jsonObject);
}
@Override
@ -46,38 +49,38 @@ public class ExchangeRateGateway extends PrivilegedGateway implements ExchangeRa
}
@Override
public List<CountryPaymentServiceSeedValueModel> getAllSeedVAluesV2() {
List<CountryPaymentServiceSeedValueModel> seedData=new ArrayList<>();
seedData.add(new CountryPaymentServiceSeedValueModel("AZ","1000","USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("BD","100000","BDT"));
seedData.add(new CountryPaymentServiceSeedValueModel("BY","1000","USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("KH","500","USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("GE","1000","USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("IN","100000","INR"));
List<CountryPaymentServiceSeedValueModel> seedData = new ArrayList<>();
seedData.add(new CountryPaymentServiceSeedValueModel("AZ", "1000", "USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("BD", "100000", "BDT"));
seedData.add(new CountryPaymentServiceSeedValueModel("BY", "1000", "USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("KH", "500", "USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("GE", "1000", "USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("IN", "100000", "INR"));
// seedData.add(new CountryPaymentServiceSeedValueModel("ID","15000000","IDR"));
seedData.add(new CountryPaymentServiceSeedValueModel("KZ","1000","USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("KG","1000","USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("MY","10000","MYR"));
seedData.add(new CountryPaymentServiceSeedValueModel("MD","1000","USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("MN","1000","USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("MN","2000000","MNT"));
seedData.add(new CountryPaymentServiceSeedValueModel("MM","1500000","MMK"));
seedData.add(new CountryPaymentServiceSeedValueModel("NP","100000","NPR"));
seedData.add(new CountryPaymentServiceSeedValueModel("PK","100000","PKR"));
seedData.add(new CountryPaymentServiceSeedValueModel("PH","500","PHP"));
seedData.add(new CountryPaymentServiceSeedValueModel("RU","1000","USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("SG","2000","SGD"));
seedData.add(new CountryPaymentServiceSeedValueModel("KZ", "1000", "USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("KG", "1000", "USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("MY", "10000", "MYR"));
seedData.add(new CountryPaymentServiceSeedValueModel("MD", "1000", "USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("MN", "1000", "USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("MN", "2000000", "MNT"));
seedData.add(new CountryPaymentServiceSeedValueModel("MM", "1500000", "MMK"));
seedData.add(new CountryPaymentServiceSeedValueModel("NP", "100000", "NPR"));
seedData.add(new CountryPaymentServiceSeedValueModel("PK", "100000", "PKR"));
seedData.add(new CountryPaymentServiceSeedValueModel("PH", "500", "PHP"));
seedData.add(new CountryPaymentServiceSeedValueModel("RU", "1000", "USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("SG", "2000", "SGD"));
// seedData.add(new CountryPaymentServiceSeedValueModel("LK","100000","LKR"));
// seedData.add(new CountryPaymentServiceSeedValueModel("LK","1000","USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("TJ","1000","USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("TH","30000","THB"));
seedData.add(new CountryPaymentServiceSeedValueModel("UZ","1000","USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("UZ","1000000","UZS"));
seedData.add(new CountryPaymentServiceSeedValueModel("VN","50000000","VND"));
seedData.add(new CountryPaymentServiceSeedValueModel("VN","2000","USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("UA","1000","USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("TJ", "1000", "USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("TH", "30000", "THB"));
seedData.add(new CountryPaymentServiceSeedValueModel("UZ", "1000", "USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("UZ", "1000000", "UZS"));
seedData.add(new CountryPaymentServiceSeedValueModel("VN", "50000000", "VND"));
seedData.add(new CountryPaymentServiceSeedValueModel("VN", "2000", "USD"));
seedData.add(new CountryPaymentServiceSeedValueModel("UA", "1000", "USD"));
return seedData;
}
@ -85,10 +88,8 @@ public class ExchangeRateGateway extends PrivilegedGateway implements ExchangeRa
@Override
public String getPreferredCountryCode() {
return RemitApplication.getStorage().getString(USER_PREFERRED_COUNTRY_CODE,"en");
return RemitApplication.getStorage().getString(USER_PREFERRED_COUNTRY_CODE, "en");
}
}

1
app/src/main/java/com/remit/jmecustomer/features/kyc/newCustomer/gateway/KYCV3Gateway.java

@ -74,6 +74,7 @@ public class KYCV3Gateway extends PrivilegedGateway implements KYCV3GatewayInter
map.put("additionalIdType", createStringUploadValue(personalInfoDTO.getAdditionalIdType()));
map.put("purposeOfRegistration", createStringUploadValue(personalInfoDTO.getPurposeOfRegistration()));
map.put("RegistrationType", createStringUploadValue(registrationType));
map.put("TrustDocId", createStringUploadValue(requestBody.getTrustDockId()));
}
File faceImageFile = null;

50
app/src/main/java/com/remit/jmecustomer/features/kyc/newCustomer/presenter/KYCV3ViewModel.java

@ -1159,40 +1159,42 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
boolean validateSelectedIDType(IDTextDTO data) {
if (data != null) {
if (kycRelatedDataDTO.getPersonalInformation() == null)
kycRelatedDataDTO.setPersonalInformation(new PersonalInfoDTO());
if (getKycSelectedOption().getType().equals("MKYC")) {
if (data != null) {
if (kycRelatedDataDTO.getPersonalInformation() == null)
kycRelatedDataDTO.setPersonalInformation(new PersonalInfoDTO());
if (shouldPromptToInputAnswer(data)) {
view.promptToInputAnswer(view.getContext().getResources().getString(R.string.specifyIdType_text), answer -> {
kycRelatedDataDTO.getPersonalInformation().setIdType("");
kycRelatedDataDTO.getPersonalInformation().setOtherIdType(answer);
customerDetailLiveData.getIdTypeLiveData().postValue(new FormInputStateDTO<>(true, null, IDTextDTO.createFromUserAnswerInput(answer)));
});
} else {
if (!data.getId().equalsIgnoreCase(data.getText())) {
kycRelatedDataDTO.getPersonalInformation().setIdType(data.getId());
kycRelatedDataDTO.getPersonalInformation().setOtherIdType("");
if (shouldPromptToInputAnswer(data)) {
view.promptToInputAnswer(view.getContext().getResources().getString(R.string.specifyIdType_text), answer -> {
kycRelatedDataDTO.getPersonalInformation().setIdType("");
kycRelatedDataDTO.getPersonalInformation().setOtherIdType(answer);
customerDetailLiveData.getIdTypeLiveData().postValue(new FormInputStateDTO<>(true, null, IDTextDTO.createFromUserAnswerInput(answer)));
});
} else {
kycRelatedDataDTO.getPersonalInformation().setIdType("");
kycRelatedDataDTO.getPersonalInformation().setOtherIdType(data.getId());
}
if (!data.getId().equalsIgnoreCase(data.getText())) {
kycRelatedDataDTO.getPersonalInformation().setIdType(data.getId());
kycRelatedDataDTO.getPersonalInformation().setOtherIdType("");
} else {
kycRelatedDataDTO.getPersonalInformation().setIdType("");
kycRelatedDataDTO.getPersonalInformation().setOtherIdType(data.getId());
}
}
}
if (kycRelatedDataDTO.getPersonalInformation().isIdTypeValid() || kycRelatedDataDTO.getPersonalInformation().isOtherIdTypeValid()) {
customerDetailLiveData.getIdTypeLiveData().setValue(new FormInputStateDTO<>(true, null, null));
return true;
if (kycRelatedDataDTO.getPersonalInformation().isIdTypeValid() || kycRelatedDataDTO.getPersonalInformation().isOtherIdTypeValid()) {
customerDetailLiveData.getIdTypeLiveData().setValue(new FormInputStateDTO<>(true, null, null));
return true;
} else {
customerDetailLiveData.getIdTypeLiveData().setValue(new FormInputStateDTO<>(false, view.getContext().getResources().getString(R.string.invalidIdType_text), null));
return false;
}
} else {
customerDetailLiveData.getIdTypeLiveData().setValue(new FormInputStateDTO<>(false, view.getContext().getResources().getString(R.string.invalidIdType_text), null));
return false;
}
} else {
customerDetailLiveData.getIdTypeLiveData().setValue(new FormInputStateDTO<>(false, view.getContext().getResources().getString(R.string.invalidIdType_text), null));
return false;
}
return true;
}
boolean validateMobileNumber(CharSequence data) {

91
app/src/main/res/layout/fragment_amount_detail_send_money_v2.xml

@ -1,53 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/nestedScrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/nestedScrollView"
android:layout_marginEnd="@dimen/_10sdp"
android:background="#F7F7F7"
android:paddingStart="@dimen/_10sdp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_marginTop="@dimen/_20sdp"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:layout_marginTop="@dimen/_20sdp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/const_send"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_10sdp"
app:layout_constraintTop_toTopOf="parent"
android:background="@drawable/black_rounded_border"
android:paddingStart="@dimen/_13sdp"
>
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_marginTop="@dimen/_4sdp"
app:layout_constraintStart_toStartOf="parent"
android:id="@+id/tv_send"
android:textColor="@color/black_opacity_50"
app:layout_constraintTop_toTopOf="parent"
android:textSize="@dimen/_12sdp"
android:text="@string/you_send_dashbord_text"
style="@style/TextStyle.VolteSemiBold12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<com.google.android.material.textfield.TextInputLayout
<com.google.android.material.textfield.TextInputEditText
app:layout_constraintTop_toBottomOf="@id/tv_send"
android:id="@+id/sendAmountEdTxt"
android:hint="100000"
style="@style/edt_style"
android:paddingVertical="@dimen/_6sdp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="You Send"
android:paddingVertical="@dimen/_5sdp"
app:hintTextAppearance="@style/TextLabelHint"
app:layout_constraintTop_toTopOf="parent">
android:background="@null"
android:imeOptions="actionDone"
android:inputType="number"
/>
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/sendAmountEdTxt"
style="@style/edt_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:imeOptions="actionDone"
android:inputType="number" />
</com.google.android.material.textfield.TextInputLayout>
<ImageView
android:id="@+id/iv_currency"
android:layout_width="@dimen/_30sdp"
android:layout_height="@dimen/_30sdp"
android:src="@drawable/flag_japan"
android:layout_marginRight="@dimen/_10sdp"
android:src="@drawable/flag_japan"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_currency"
@ -56,17 +64,16 @@
<TextView
android:id="@+id/tv_currency"
android:layout_marginRight="@dimen/_50sdp"
style="@style/TextStyle.VolteSemiBold16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/_50sdp"
android:text="JPY"
android:textColor="@color/black_opacity_87"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_currency"
app:layout_constraintTop_toTopOf="parent"
/>
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
@ -79,25 +86,31 @@
android:paddingStart="@dimen/_13sdp"
app:layout_constraintTop_toBottomOf="@id/const_send">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="They receive"
android:paddingVertical="@dimen/_5sdp"
app:hintTextAppearance="@style/TextLabelHint"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_marginTop="@dimen/_4sdp"
app:layout_constraintStart_toStartOf="parent"
android:id="@+id/tv_receive"
android:textColor="@color/black_opacity_50"
app:layout_constraintTop_toTopOf="parent"
android:textSize="@dimen/_12sdp"
android:hint="100000"
android:text="@string/you_receive_dashbord_text"
style="@style/TextStyle.VolteSemiBold12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<com.google.android.material.textfield.TextInputEditText
app:layout_constraintTop_toBottomOf="@+id/tv_receive"
android:id="@+id/receiveAmountEdTxt"
style="@style/edt_style"
android:hint="100000"
android:paddingVertical="@dimen/_6sdp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:imeOptions="actionDone"
android:inputType="number" />
</com.google.android.material.textfield.TextInputLayout>
<TextView
android:id="@+id/tv_currency_2"
style="@style/TextStyle.VolteSemiBold16"
@ -244,12 +257,12 @@
<RelativeLayout
android:layout_marginTop="@dimen/_20sdp"
android:gravity="center"
android:id="@+id/agreeButton"
style="@style/newButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_20sdp"
android:gravity="center"
app:layout_constraintTop_toBottomOf="@id/rewardsPointsContainer">
<TextView
@ -263,23 +276,23 @@
android:textColor="@color/white" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_10sdp"
android:layout_marginTop="@dimen/_2sdp"
android:layout_toRightOf="@+id/btn_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_arrow_right" />
</RelativeLayout>
<androidx.cardview.widget.CardView
app:layout_constraintTop_toBottomOf="@+id/agreeButton"
android:id="@+id/idSendMoneyFootNoteContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/_10sdp"
android:visibility="invisible"
app:cardCornerRadius="@dimen/_5sdp">
app:cardCornerRadius="@dimen/_5sdp"
app:layout_constraintTop_toBottomOf="@+id/agreeButton">
<com.remit.jmecustomer.common.customwidgets.JmeTextView
android:id="@+id/sendMoneyNoteText"

2
app/src/main/res/layout/fragment_choose_kyc.xml

@ -24,6 +24,6 @@
android:layout_marginTop="@dimen/_15sdp"
android:layout_marginBottom="@dimen/_50sdp"
android:enabled="true"
android:text="@string/next_text" />
android:text="@string/save_and_next_text" />
</androidx.constraintlayout.widget.ConstraintLayout>

2
app/src/main/res/values-bn/strings.xml

@ -662,6 +662,8 @@
<string name="cancel_transaction_text">লেনদেন বাতিল করুন</string>
<string name="choose">পছন্দ করা</string>
</resources>

2
app/src/main/res/values-ja/strings.xml

@ -660,6 +660,8 @@
<string name="cancel_transaction_text">取引をキャンセル</string>
<string name="choose">選ぶ</string>
</resources>

2
app/src/main/res/values-ne/strings.xml

@ -660,6 +660,8 @@
<string name="cancel_transaction_text">लेनदेन रद्द गर्नुहोस्</string>
<string name="choose">छान्नुहोस्</string>
</resources>

2
app/src/main/res/values-si/strings.xml

@ -662,6 +662,8 @@
<string name="cancel_transaction_text">මුදල් හරහා ඉවත් කරන්න</string>
<string name="choose">තෝරා</string>

2
app/src/main/res/values-vi/strings.xml

@ -661,5 +661,7 @@
<string name="cancel_transaction_text">Hủy giao dịch</string>
<string name="choose">Chọn</string>
</resources>

1
app/src/main/res/values/styles.xml

@ -509,6 +509,7 @@
</style>
<style name="TextLabelHint" parent="TextAppearance.Design.Hint">
<item name="android:focusedByDefault">true</item>
<item name="android:textSize">@dimen/_12sdp</item>
<item name="android:fontFamily">@font/volte_medium</item>
<item name="android:textColor">@color/black_opacity_38</item>

Loading…
Cancel
Save