@primer-io/react-native 2.1.0 → 2.2.1

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.
@@ -137,5 +137,5 @@ dependencies {
137
137
  api 'com.facebook.react:react-native:+'
138
138
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
139
139
  implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3"
140
- implementation 'io.primer:android:2.1.0'
140
+ implementation 'io.primer:android:2.2.1'
141
141
  }
@@ -23,6 +23,7 @@ import io.primer.android.domain.tokenization.models.PrimerPaymentMethodData
23
23
  import io.primer.android.domain.tokenization.models.PrimerPaymentMethodTokenData
24
24
  import kotlinx.serialization.encodeToString
25
25
  import kotlinx.serialization.json.Json
26
+ import org.json.JSONArray
26
27
  import org.json.JSONObject
27
28
 
28
29
  @OptIn(ExperimentalPrimerApi::class)
@@ -46,7 +47,7 @@ class PrimerRNHeadlessUniversalCheckoutListener : PrimerHeadlessUniversalCheckou
46
47
  sendEvent?.invoke(
47
48
  PrimerHeadlessUniversalCheckoutEvent.ON_HUC_AVAILABLE_PAYMENT_METHODS_LOADED.eventName,
48
49
  JSONObject().apply {
49
- put("paymentMethodTypes", paymentMethods.map { it.paymentMethodType.name })
50
+ put("paymentMethodTypes", JSONArray(paymentMethods.map { it.paymentMethodType.name }))
50
51
  }
51
52
  )
52
53
  successCallback?.invoke(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer-io/react-native",
3
- "version": "2.1.0",
3
+ "version": "2.2.1",
4
4
  "description": "Primer SDK for RN",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -17,5 +17,5 @@ Pod::Spec.new do |s|
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
18
 
19
19
  s.dependency "React-Core"
20
- s.dependency "PrimerSDK", "2.1.0"
20
+ s.dependency "PrimerSDK", "2.2.1"
21
21
  end