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.
package/libs/emvNative/src/main/java/com/quivio_transaction_processor/EMVPaymentManagerModule.kt
CHANGED
|
@@ -46,7 +46,14 @@ class EMVPaymentManagerModule(private val reactContext: ReactApplicationContext)
|
|
|
46
46
|
|
|
47
47
|
@ReactMethod
|
|
48
48
|
fun initializeLib() {
|
|
49
|
-
|
|
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!")
|