|
@ -22,12 +22,16 @@ public class TransactionPasswordPromptV2Presenter extends BasePresenter implemen |
|
|
private final TransactionPasswordPromptV2InteractorInterface.TransactionPasswordPromptV2GatewayInterface gateway; |
|
|
private final TransactionPasswordPromptV2InteractorInterface.TransactionPasswordPromptV2GatewayInterface gateway; |
|
|
private final CompositeDisposable compositeDisposable; |
|
|
private final CompositeDisposable compositeDisposable; |
|
|
private long updateCountdownValue; |
|
|
private long updateCountdownValue; |
|
|
|
|
|
private String selectedAmount; |
|
|
|
|
|
private String selectedKftcId; |
|
|
|
|
|
|
|
|
public TransactionPasswordPromptV2Presenter(TransactionPasswordPromptV2PresenterInterface.TransactionPasswordPromptV2ContractInterface view) { |
|
|
public TransactionPasswordPromptV2Presenter(TransactionPasswordPromptV2PresenterInterface.TransactionPasswordPromptV2ContractInterface view) { |
|
|
this.view=view; |
|
|
this.view=view; |
|
|
this.gateway=new TransactionPasswordPromptV2Gateway(this); |
|
|
this.gateway=new TransactionPasswordPromptV2Gateway(this); |
|
|
this.compositeDisposable = new CompositeDisposable(); |
|
|
this.compositeDisposable = new CompositeDisposable(); |
|
|
this.updateCountdownValue =-1; |
|
|
this.updateCountdownValue =-1; |
|
|
|
|
|
this.selectedKftcId=""; |
|
|
|
|
|
this.selectedAmount=""; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -35,7 +39,7 @@ public class TransactionPasswordPromptV2Presenter extends BasePresenter implemen |
|
|
public void getOtp() { |
|
|
public void getOtp() { |
|
|
if(updateCountdownValue==-1) { |
|
|
if(updateCountdownValue==-1) { |
|
|
this.compositeDisposable.add( |
|
|
this.compositeDisposable.add( |
|
|
this.gateway.requestOtp(this.gateway.getAuth(), this.gateway.getUserID()) |
|
|
|
|
|
|
|
|
this.gateway.requestOtp(this.gateway.getAuth(), this.gateway.getUserID(),selectedAmount,selectedKftcId) |
|
|
.doOnSubscribe(disposable -> view.showProgressBar(true, getStringfromStringId(R.string.requesting_otp_text))) |
|
|
.doOnSubscribe(disposable -> view.showProgressBar(true, getStringfromStringId(R.string.requesting_otp_text))) |
|
|
.doFinally(() -> view.showProgressBar(false, "")) |
|
|
.doFinally(() -> view.showProgressBar(false, "")) |
|
|
.subscribeOn(Schedulers.io()) |
|
|
.subscribeOn(Schedulers.io()) |
|
@ -61,6 +65,20 @@ public class TransactionPasswordPromptV2Presenter extends BasePresenter implemen |
|
|
return updateCountdownValue; |
|
|
return updateCountdownValue; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void updateSelectedAmount(String selectedAmount) { |
|
|
|
|
|
if(selectedAmount==null) |
|
|
|
|
|
selectedAmount=""; |
|
|
|
|
|
this.selectedAmount=selectedAmount; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void updateSelectedKftcId(String selectedKftcId) { |
|
|
|
|
|
if(selectedKftcId==null) |
|
|
|
|
|
selectedKftcId=""; |
|
|
|
|
|
this.selectedKftcId=selectedKftcId; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ResendRequestObserver extends GenericApiObserverResponseV2<MessageResponseDataModel> |
|
|
class ResendRequestObserver extends GenericApiObserverResponseV2<MessageResponseDataModel> |
|
|
{ |
|
|
{ |
|
|