@xsolla/payment-client-core 0.1.14-test17 → 0.1.14-test19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4630,6 +4630,7 @@ class SavePaymentMethodStatusService {
4630
4630
  this.savedPaymentAccountChangesService = savedPaymentAccountChangesService;
4631
4631
  this.nextActionService = nextActionService;
4632
4632
  this.checkStatusService = checkStatusService;
4633
+ this.statusChecked = false;
4633
4634
  }
4634
4635
  async getStatus(params) {
4635
4636
  this.statusRequestService.setRequestParams(params);
@@ -4640,11 +4641,18 @@ class SavePaymentMethodStatusService {
4640
4641
  if (this.savingFailedOrCancel(statusResponse?.status) || this.savingSuccessful(accountData, statusResponse?.status)) {
4641
4642
  return statusResponse.status;
4642
4643
  }
4643
- this.checkStatus(params);
4644
- statusResponse.status.isSavePaymentAccount = true;
4644
+ if (!this.statusChecked) {
4645
+ this.checkStatus(params);
4646
+ statusResponse.status.statusState = StatusEnum.processing;
4647
+ return statusResponse.status;
4648
+ }
4649
+ statusResponse.status.statusState = StatusEnum.error;
4645
4650
  return statusResponse.status;
4646
4651
  }
4647
4652
  checkStatus(params) {
4653
+ if (!this.statusChecked) {
4654
+ this.statusChecked = true;
4655
+ }
4648
4656
  this.startWaitingStatusUpdates(params.invoice);
4649
4657
  this.statusRequestService.request();
4650
4658
  }