@tryheliumai/paywall-sdk-react-native 0.1.13 → 0.1.14

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.
@@ -48,13 +48,6 @@ class BridgingPaywallDelegate: HeliumPaywallDelegate {
48
48
  return await withCheckedContinuation { continuation in
49
49
  let transactionId = UUID().uuidString
50
50
 
51
- let userInfo: [String: Any] = [
52
- NSLocalizedDescriptionKey: "Failed to make purchase",
53
- NSLocalizedFailureReasonErrorKey: "An unknown error occurred",
54
- NSLocalizedRecoverySuggestionErrorKey: "Please try again later"
55
- ]
56
- let failureError = NSError(domain: "PaywallErrorDomain", code: 1001, userInfo: userInfo)
57
-
58
51
  // Store continuation callback
59
52
  purchaseState.pendingResponses[transactionId] = { response in
60
53
  let status: HeliumPaywallTransactionStatus = switch response.status {
@@ -62,9 +55,8 @@ class BridgingPaywallDelegate: HeliumPaywallDelegate {
62
55
  case "purchased": .purchased
63
56
  case "cancelled": .cancelled
64
57
  case "restored": .restored
65
- case "failed": .failed(failureError)
66
58
  case "pending": .pending
67
- default: .failed(failureError)
59
+ default: .failed(NSError())
68
60
  }
69
61
  continuation.resume(returning: status)
70
62
  }
@@ -1,4 +1,4 @@
1
- export type HeliumTransactionStatus = 'purchased' | 'failed' | 'cancelled' | 'pending' | 'restored';
1
+ export type HeliumTransactionStatus = 'completed' | 'failed' | 'cancelled' | 'pending' | 'restored';
2
2
  export type HeliumDownloadStatus = 'success' | 'failed' | 'inProgress' | 'notStarted';
3
3
  export interface HeliumCallbacks {
4
4
  makePurchase: (productId: string) => Promise<HeliumTransactionStatus>;
@@ -1,4 +1,4 @@
1
- export type HeliumTransactionStatus = 'purchased' | 'failed' | 'cancelled' | 'pending' | 'restored';
1
+ export type HeliumTransactionStatus = 'completed' | 'failed' | 'cancelled' | 'pending' | 'restored';
2
2
  export type HeliumDownloadStatus = 'success' | 'failed' | 'inProgress' | 'notStarted';
3
3
  export interface HeliumCallbacks {
4
4
  makePurchase: (productId: string) => Promise<HeliumTransactionStatus>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryheliumai/paywall-sdk-react-native",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Paywall SDK Helium",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./lib/commonjs/index.js",
package/src/types.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type HeliumTransactionStatus = 'purchased' | 'failed' | 'cancelled' | 'pending' | 'restored';
1
+ export type HeliumTransactionStatus = 'completed' | 'failed' | 'cancelled' | 'pending' | 'restored';
2
2
  export type HeliumDownloadStatus = 'success' | 'failed' | 'inProgress' | 'notStarted';
3
3
 
4
4
  export interface HeliumCallbacks {