react-native-iap 12.8.4 → 12.8.5

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.
@@ -502,17 +502,18 @@ class RNIapIosSk2iOS15: Sk2Delegate {
502
502
 
503
503
  func startObserving() {
504
504
  hasListeners = true
505
+ addTransactionObserver()
505
506
  }
506
507
 
507
508
  func stopObserving() {
508
509
  hasListeners = false
510
+ removeTransactionObserver()
509
511
  }
510
512
 
511
513
  public func initConnection(
512
514
  _ resolve: @escaping RCTPromiseResolveBlock = { _ in },
513
515
  reject: @escaping RCTPromiseRejectBlock = { _, _, _ in }
514
516
  ) {
515
- addTransactionObserver()
516
517
  resolve(AppStore.canMakePayments)
517
518
  }
518
519
  public func endConnection(
@@ -521,8 +522,7 @@ class RNIapIosSk2iOS15: Sk2Delegate {
521
522
  ) {
522
523
  products.removeAll()
523
524
  transactions.removeAll()
524
- updateListenerTask?.cancel()
525
- updateListenerTask = nil
525
+ removeTransactionObserver()
526
526
  resolve(nil)
527
527
  }
528
528
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-iap",
3
- "version": "12.8.4",
3
+ "version": "12.8.5",
4
4
  "description": "React Native In App Purchase Module.",
5
5
  "repository": "https://github.com/dooboolab/react-native-iap",
6
6
  "author": "dooboolab <support@dooboolab.com> (https://github.com/dooboolab)",
@@ -81,7 +81,7 @@
81
81
  "@jeremybarbet/google-api-types": "1.4.0",
82
82
  "@react-native-community/eslint-config": "3.2.0",
83
83
  "@release-it/conventional-changelog": "5.1.1",
84
- "@testing-library/jest-native": "4.0.13",
84
+ "@testing-library/jest-native": "5.4.2",
85
85
  "@testing-library/react-native": "11.5.4",
86
86
  "@types/jest": "28.1.8",
87
87
  "@types/react": "~17.0.47",
@@ -93,7 +93,7 @@
93
93
  "eslint-config-prettier": "8.7.0",
94
94
  "eslint-plugin-jest": "26.9.0",
95
95
  "eslint-plugin-prettier": "4.2.1",
96
- "eslint-plugin-simple-import-sort": "7.0.0",
96
+ "eslint-plugin-simple-import-sort": "10.0.0",
97
97
  "expo-module-scripts": "^3.0.4",
98
98
  "jest": "28.1.3",
99
99
  "monolinter": "1.0.4",