@xsolla/payment-client-core 0.1.14-test5 → 0.1.14-test7

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.
@@ -4648,8 +4648,7 @@ class SavePaymentMethodStatusService {
4648
4648
  }
4649
4649
  startWaitingStatusUpdates(invoice) {
4650
4650
  this.listenStatusService.listen(invoice);
4651
- this.listenStatusService.statusUpdated$
4652
- .pipe(skip(1))
4651
+ this.listenStatusSubscription = this.listenStatusService.statusUpdated$
4653
4652
  .subscribe(({ statusResponse }) => {
4654
4653
  if (statusResponse.status) {
4655
4654
  this.loadNewPaymentAccountData(statusResponse.status);
@@ -4670,6 +4669,11 @@ class SavePaymentMethodStatusService {
4670
4669
  }
4671
4670
  handleSavingStatus(status, account) {
4672
4671
  this.listenStatusService.stopListening();
4672
+ this.listenStatusSubscription.unsubscribe();
4673
+ const updatingIsProcessing = status?.titleClass !== TitleClass.cancel && status?.titleClass !== TitleClass.cancelUser && !account;
4674
+ if (updatingIsProcessing) {
4675
+ return;
4676
+ }
4673
4677
  const paymentAccountWasSaved = status?.titleClass === TitleClass.done && account !== null;
4674
4678
  const isSavePaymentMethod = true;
4675
4679
  this.savePaymentMethodStatus = paymentAccountWasSaved ? SavePaymentMethodStatus.success : SavePaymentMethodStatus.failed;