@umituz/react-native-subscription 2.37.91 → 2.37.93

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.91",
3
+ "version": "2.37.93",
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",
@@ -6,6 +6,14 @@ export async function executePurchase(
6
6
  pkg: PurchasesPackage,
7
7
  userId: string
8
8
  ): Promise<boolean> {
9
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
10
+ console.log("[PackagePurchaser] executePurchase called", {
11
+ productId: pkg.product.identifier,
12
+ userId,
13
+ serviceInitialized: service.isInitialized(),
14
+ });
15
+ }
16
+
9
17
  if (!service.isInitialized()) {
10
18
  throw new Error("Service not initialized");
11
19
  }
@@ -101,6 +101,14 @@ class SubscriptionManagerImpl {
101
101
  if (explicitUserId) {
102
102
  await this.initialize(explicitUserId);
103
103
  }
104
+ if (typeof __DEV__ !== 'undefined' && __DEV__) {
105
+ console.log('[SubscriptionManager] purchasePackage: init complete, starting purchase', {
106
+ productId: pkg.product.identifier,
107
+ hasPackageHandler: !!this.packageHandler,
108
+ hasService: !!this.serviceInstance,
109
+ serviceInitialized: this.serviceInstance?.isInitialized() ?? false,
110
+ });
111
+ }
104
112
  this.ensurePackageHandlerInitialized();
105
113
  const resolvedUserId = explicitUserId || getCurrentUserIdOrThrow(this.state);
106
114
  const result = await purchasePackageOperation(pkg, this.managerConfig, resolvedUserId, this.packageHandler!);
@@ -86,8 +86,8 @@ async function executeSubscriptionPurchase(
86
86
  };
87
87
  }
88
88
 
89
- /** Default timeout for purchase operations (2 minutes) */
90
- const PURCHASE_TIMEOUT_MS = 120_000;
89
+ /** Default timeout for purchase operations (60 seconds) */
90
+ const PURCHASE_TIMEOUT_MS = 60_000;
91
91
 
92
92
  function withTimeout<T>(promise: Promise<T>, ms: number, label: string): Promise<T> {
93
93
  return new Promise<T>((resolve, reject) => {