@capgo/native-purchases 8.3.0 → 8.3.4

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.
@@ -49,7 +49,7 @@ repositories {
49
49
 
50
50
 
51
51
  dependencies {
52
- implementation "com.google.guava:guava:33.5.0-android"
52
+ implementation "com.google.guava:guava:33.6.0-android"
53
53
  def billing_version = "8.3.0"
54
54
  implementation "com.android.billingclient:billing:$billing_version"
55
55
  implementation fileTree(dir: 'libs', include: ['*.jar'])
@@ -41,7 +41,7 @@ import org.json.JSONArray;
41
41
  @CapacitorPlugin(name = "NativePurchases")
42
42
  public class NativePurchasesPlugin extends Plugin {
43
43
 
44
- private final String pluginVersion = "8.3.0";
44
+ private final String pluginVersion = "8.3.4";
45
45
  public static final String TAG = "NativePurchases";
46
46
  private static final Phaser semaphoreReady = new Phaser(1);
47
47
  private BillingClient billingClient;
@@ -364,7 +364,18 @@ public class NativePurchasesPlugin extends Plugin {
364
364
  );
365
365
  try {
366
366
  Log.d(TAG, "Waiting for billing client setup to finish");
367
- semaphoreReady.await();
367
+ boolean setupCompleted = semaphoreReady.await(10, TimeUnit.SECONDS);
368
+
369
+ if (!setupCompleted) {
370
+ Log.e(TAG, "Billing client setup timed out after 10 seconds");
371
+ if (pendingCall != null) {
372
+ pendingCall.reject("BILLING_SETUP_TIMEOUT", "Billing client initialization timed out");
373
+ pendingCall = null;
374
+ }
375
+ closeBillingClient();
376
+ throw new RuntimeException("Billing setup timed out");
377
+ }
378
+
368
379
  Log.d(TAG, "Billing client setup wait completed");
369
380
 
370
381
  // Check if billing setup failed
@@ -21,7 +21,7 @@ public class NativePurchasesPlugin: CAPPlugin, CAPBridgedPlugin {
21
21
  CAPPluginMethod(name: "isEntitledToOldBusinessModel", returnType: CAPPluginReturnPromise)
22
22
  ]
23
23
 
24
- private let pluginVersion: String = "8.3.0"
24
+ private let pluginVersion: String = "8.3.4"
25
25
  private var transactionUpdatesTask: Task<Void, Never>?
26
26
 
27
27
  @objc func getPluginVersion(_ call: CAPPluginCall) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/native-purchases",
3
- "version": "8.3.0",
3
+ "version": "8.3.4",
4
4
  "description": "In-app Subscriptions Made Easy",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",