quivio-transaction-processor 1.24.0-beta → 2.0.0-beta

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.
@@ -46,7 +46,14 @@ class EMVPaymentManagerModule(private val reactContext: ReactApplicationContext)
46
46
 
47
47
  @ReactMethod
48
48
  fun initializeLib() {
49
- val context = currentActivity ?: reactContext
49
+ // Prevent double initialization
50
+ if (dsiEMVManager != null) {
51
+ log("Payment Library already initialised")
52
+ return
53
+ }
54
+
55
+ // Use application context to avoid lifecycle-owner registration errors
56
+ val context = reactContext.applicationContext
50
57
  dsiEMVManager = EMVPaymentManager(context)
51
58
  dsiEMVManager?.registerListener(this, this)
52
59
  log("Payment Library Initialised!")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quivio-transaction-processor",
3
- "version": "1.24.0-beta",
3
+ "version": "2.0.0-beta",
4
4
  "description": "React Native hook for Card payment integration with DataCap",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",