@umituz/react-native-subscription 2.37.55 → 2.37.56

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-subscription",
3
- "version": "2.37.55",
3
+ "version": "2.37.56",
4
4
  "description": "Complete subscription management with RevenueCat, paywall UI, and credits system for React Native apps",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -1,5 +1,5 @@
1
1
  import type { IRevenueCatService } from "../../../../shared/application/ports/IRevenueCatService";
2
- import { initializeRevenueCatService, getRevenueCatService } from "../services/RevenueCatService";
2
+ import { initializeRevenueCatService, getRevenueCatService } from "../services/revenueCatServiceInstance";
3
3
  import { ensureServiceAvailable } from "./subscriptionManagerUtils";
4
4
  import type { RevenueCatConfig } from "../../../revenuecat/core/types";
5
5
 
@@ -78,11 +78,18 @@ export class RevenueCatService implements IRevenueCatService {
78
78
 
79
79
  this.listenerManager.destroy();
80
80
 
81
- try {
82
- await Purchases.logOut();
83
- this.stateManager.setInitialized(false);
84
- } catch (error) {
85
- console.error('[RevenueCatService] Logout failed during reset', { error });
81
+ const currentUserId = this.getCurrentUserId();
82
+
83
+ if (currentUserId) {
84
+ try {
85
+ await Purchases.logOut();
86
+ } catch (error) {
87
+ if (__DEV__) {
88
+ console.warn('[RevenueCatService] logOut failed during reset', { error });
89
+ }
90
+ }
86
91
  }
92
+
93
+ this.stateManager.setInitialized(false);
87
94
  }
88
95
  }
@@ -1 +0,0 @@
1
- export { initializeRevenueCatService, getRevenueCatService } from "./revenueCatServiceInstance";