@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.
- package/esm2020/lib/core/payment/status/save-payment-method-status/save-payment-method-status.service.mjs +8 -4
- package/fesm2015/xsolla-payment-client-core.mjs +6 -2
- package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
- package/fesm2020/xsolla-payment-client-core.mjs +6 -2
- package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/payment/status/save-payment-method-status/save-payment-method-status.service.d.ts +1 -0
- package/package.json +1 -1
- package/xsolla-payment-client-core-0.1.14-test7.tgz +0 -0
- package/xsolla-payment-client-core-0.1.14-test5.tgz +0 -0
|
@@ -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;
|