@umituz/react-native-subscription 2.27.124 → 2.27.125

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.27.124",
3
+ "version": "2.27.125",
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",
@@ -9,7 +9,9 @@ import { usePaywallVisibility } from "../../subscription/presentation/usePaywall
9
9
  import { useSubscriptionPackages } from "../../subscription/infrastructure/hooks/useSubscriptionPackages";
10
10
  import { useRevenueCatTrialEligibility } from "../../subscription/infrastructure/hooks/useRevenueCatTrialEligibility";
11
11
  import { createCreditAmountsFromPackages } from "../../../utils/creditMapper";
12
- import { PaywallModal, type TrialEligibilityInfo } from "./PaywallModal";
12
+ import { PaywallModal } from "./PaywallModal";
13
+ import type { TrialEligibilityInfo } from "./PaywallModal.types";
14
+
13
15
  import { usePaywallActions } from "../hooks/usePaywallActions";
14
16
  import { useAuthAwarePurchase } from "../../subscription/presentation/useAuthAwarePurchase";
15
17
  import type { PaywallContainerProps } from "./PaywallContainer.types";
@@ -21,9 +21,14 @@ export const PaywallModal: React.FC<PaywallModalProps> = React.memo((props) => {
21
21
 
22
22
  const handleLegalUrl = useCallback(async (url: string | undefined) => {
23
23
  if (!url) return;
24
- try { if (await Linking.canOpenURL(url)) await Linking.openURL(url); } catch { }
24
+ try {
25
+ if (await Linking.canOpenURL(url)) await Linking.openURL(url);
26
+ } catch (err) {
27
+ console.error("[PaywallModal] Legal link error:", err);
28
+ }
25
29
  }, []);
26
30
 
31
+
27
32
  return (
28
33
  <BaseModal visible={visible} onClose={onClose} contentStyle={styles.modalContent}>
29
34
  <View style={[styles.container, { backgroundColor: tokens.colors.surface }]}>
@@ -14,7 +14,8 @@ export class SubscriptionSyncService {
14
14
  try {
15
15
  await this.processor.processPurchase(userId, productId, customerInfo, source);
16
16
  subscriptionEventBus.emit(SUBSCRIPTION_EVENTS.PURCHASE_COMPLETED, { userId, productId });
17
- } catch {
17
+ } catch (err) {
18
+ console.error("[SubscriptionSyncService] purchase error:", err);
18
19
  }
19
20
  }
20
21
 
@@ -22,7 +23,8 @@ export class SubscriptionSyncService {
22
23
  try {
23
24
  await this.processor.processRenewal(userId, productId, newExpirationDate, customerInfo);
24
25
  subscriptionEventBus.emit(SUBSCRIPTION_EVENTS.RENEWAL_DETECTED, { userId, productId });
25
- } catch {
26
+ } catch (err) {
27
+ console.error("[SubscriptionSyncService] renewal error:", err);
26
28
  }
27
29
  }
28
30
 
@@ -37,7 +39,9 @@ export class SubscriptionSyncService {
37
39
  try {
38
40
  await this.processor.processStatusChange(userId, isPremium, productId, expiresAt, willRenew, periodType);
39
41
  subscriptionEventBus.emit(SUBSCRIPTION_EVENTS.PREMIUM_STATUS_CHANGED, { userId, isPremium });
40
- } catch {
42
+ } catch (err) {
43
+ console.error("[SubscriptionSyncService] status change error:", err);
41
44
  }
42
45
  }
43
46
  }
47
+
@@ -3,7 +3,8 @@
3
3
  * Validation and helper functions for SubscriptionManager
4
4
  */
5
5
 
6
- import type { SubscriptionManagerConfig } from "./SubscriptionManager";
6
+ import type { SubscriptionManagerConfig } from "./SubscriptionManager.types";
7
+
7
8
  import type { IRevenueCatService } from "../../../../shared/application/ports/IRevenueCatService";
8
9
  import { SubscriptionInternalState } from "./SubscriptionInternalState";
9
10
 
@@ -118,6 +118,10 @@ export {
118
118
  // Screens
119
119
  export {
120
120
  WalletScreen,
121
- type WalletScreenProps,
122
- type WalletScreenTranslations,
123
121
  } from "./presentation/screens/WalletScreen";
122
+
123
+ export type {
124
+ WalletScreenProps,
125
+ WalletScreenTranslations,
126
+ } from "./presentation/screens/WalletScreen.types";
127
+
@@ -5,7 +5,8 @@
5
5
  * Set once at app init, used by WalletScreen automatically.
6
6
  */
7
7
 
8
- import type { WalletScreenTranslations } from "../../presentation/screens/WalletScreen";
8
+ import type { WalletScreenTranslations } from "../../presentation/screens/WalletScreen.types";
9
+
9
10
 
10
11
  export interface WalletConfiguration {
11
12
  translations: WalletScreenTranslations;