Browse Source

Update balannce fixes

master
Preyea Regmi 6 years ago
parent
commit
e1c22d209b
  1. 9
      app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/presenter/SendMoneyV2Presenter.java
  2. 1
      app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/presenter/SendMoneyV2PresenterInterface.java
  3. 1
      app/src/main/java/com/gmeremit/online/gmeremittance_native/withdrawV2/presenter/WithdrawV2Presenter.java

9
app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/presenter/SendMoneyV2Presenter.java

@ -53,7 +53,6 @@ public class SendMoneyV2Presenter extends BasePresenter implements SendMoneyV2Pr
private String selectedForexId = null; private String selectedForexId = null;
private String selectedTransferAmount = null; private String selectedTransferAmount = null;
private boolean currentTransactionSuccess=false;
@ -188,10 +187,6 @@ public class SendMoneyV2Presenter extends BasePresenter implements SendMoneyV2Pr
}); });
} }
@Override
public boolean isRecentTransactionSuccess() {
return currentTransactionSuccess;
}
public void performSendMoneyTransaction(String password) { public void performSendMoneyTransaction(String password) {
@ -358,7 +353,6 @@ public class SendMoneyV2Presenter extends BasePresenter implements SendMoneyV2Pr
userInfoModelV2.setAvailableBalance(sendMoneyResponse.getExtra()); userInfoModelV2.setAvailableBalance(sendMoneyResponse.getExtra());
userInfoModelV2.setYearlyLimit(sendMoneyResponse.getExtra2()); userInfoModelV2.setYearlyLimit(sendMoneyResponse.getExtra2());
gateway.updateUserInfoInBatch(userInfoModelV2); gateway.updateUserInfoInBatch(userInfoModelV2);
currentTransactionSuccess=true;
view.showPopUpMessage(sendMoneyResponse.getMsg(), CustomAlertDialog.AlertType.SUCCESS, new CustomAlertDialog.CustomDialogActionListener() { view.showPopUpMessage(sendMoneyResponse.getMsg(), CustomAlertDialog.AlertType.SUCCESS, new CustomAlertDialog.CustomDialogActionListener() {
@Override @Override
@ -368,20 +362,17 @@ public class SendMoneyV2Presenter extends BasePresenter implements SendMoneyV2Pr
} }
}); });
} else { } else {
currentTransactionSuccess=false;
view.showPopUpMessage(sendMoneyResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null); view.showPopUpMessage(sendMoneyResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null);
} }
} }
@Override @Override
public void onFailed(String message) { public void onFailed(String message) {
currentTransactionSuccess=false;
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null); view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null);
} }
@Override @Override
protected void onConnectionNotEstablished(String message) { protected void onConnectionNotEstablished(String message) {
currentTransactionSuccess=false;
view.showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, null); view.showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, null);
} }
} }

1
app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/presenter/SendMoneyV2PresenterInterface.java

@ -42,7 +42,6 @@ public interface SendMoneyV2PresenterInterface extends BasePresenterInterface {
void promptPinAndPerformTransaction(); void promptPinAndPerformTransaction();
boolean isRecentTransactionSuccess();
interface SendMoneyV2ContractInterface extends BaseContractInterface interface SendMoneyV2ContractInterface extends BaseContractInterface
{ {

1
app/src/main/java/com/gmeremit/online/gmeremittance_native/withdrawV2/presenter/WithdrawV2Presenter.java

@ -51,7 +51,6 @@ public class WithdrawV2Presenter extends BasePresenter implements WithdrawV2Pres
} }
private boolean validateAmount(String amount) { private boolean validateAmount(String amount) {
this.view.onWithdrawSuccess();
if (amount == null || amount.length() < 1) { if (amount == null || amount.length() < 1) {
view.showToastMessage("Amount cannot be empty"); view.showToastMessage("Amount cannot be empty");
return false; return false;

Loading…
Cancel
Save