react-native-mesmart 0.4.1 → 0.4.2

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.
@@ -14,18 +14,13 @@ class SunmiImpl(
14
14
  private val reactContext: ReactApplicationContext
15
15
  ) {
16
16
  private val payKernel = SunmiPayKernel.getInstance()
17
- private lateinit var sunmiRfidHelper: SunmiRfidHelper
18
- private lateinit var sunmiPrintHelper: SunmiPrintHelper
17
+ private var sunmiRfidHelper: SunmiRfidHelper = SunmiRfidHelper(payKernel)
18
+ private var sunmiPrintHelper: SunmiPrintHelper = SunmiPrintHelper(reactContext)
19
19
 
20
- fun bindService() {
20
+ init {
21
21
  payKernel.initPaySDK(reactContext, object : ConnectCallback {
22
- override fun onConnectPaySDK() {
23
- sunmiRfidHelper = SunmiRfidHelper(payKernel)
24
- sunmiPrintHelper = SunmiPrintHelper(reactContext)
25
- }
26
-
27
- override fun onDisconnectPaySDK() {
28
- }
22
+ override fun onConnectPaySDK() {}
23
+ override fun onDisconnectPaySDK() {}
29
24
  })
30
25
  }
31
26
 
@@ -14,7 +14,6 @@ class SunmiModule(
14
14
  init {
15
15
  if (SunmiUtils.isSunmiP2()) {
16
16
  sunmi = SunmiImpl(reactContext)
17
- sunmi!!.bindService()
18
17
  }
19
18
  }
20
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-mesmart",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Sunmi P2 utilities and Plugpag wrapper for React Native",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",