react-native-smallcase-gateway 1.0.1 → 1.0.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.
- package/CHANGELOG.md +7 -0
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/smallcase/gateway/reactnative/SmallcaseGatewayModule.kt +6 -0
- package/ios/SmallcaseGateway.m +5 -2
- package/package.json +1 -1
- package/react-native-smallcase-gateway.podspec +1 -1
- package/src/SmallcaseGateway.js +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.0.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.0.0...v1.0.2) (2022-04-04)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* log SDK version with transactionId ([8b833b3](https://github.com/smallcase/react-native-smallcase-gateway/commit/8b833b366c0b8f9a030f920134d82c0f84fa6c7f))
|
|
11
|
+
|
|
5
12
|
### [1.0.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.0.0...v1.0.1) (2022-03-15)
|
|
6
13
|
|
|
7
14
|
## [1.0.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v0.10.0...v1.0.0) (2022-01-21)
|
package/android/build.gradle
CHANGED
|
@@ -82,7 +82,7 @@ repositories {
|
|
|
82
82
|
dependencies {
|
|
83
83
|
//noinspection GradleDynamicVersion
|
|
84
84
|
implementation 'com.facebook.react:react-native:+' // From node_modules
|
|
85
|
-
implementation 'com.smallcase.gateway:sdk:3.1.
|
|
85
|
+
implementation 'com.smallcase.gateway:sdk:3.1.21'
|
|
86
86
|
implementation "androidx.core:core-ktx:1.3.1"
|
|
87
87
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
88
88
|
}
|
|
@@ -69,6 +69,12 @@ class SmallcaseGatewayModule(reactContext: ReactApplicationContext?) : ReactCont
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
@ReactMethod
|
|
73
|
+
fun setHybridSdkVersion(sdkVersion: String) {
|
|
74
|
+
SmallcaseGatewaySdk.setSDKType("react-native")
|
|
75
|
+
SmallcaseGatewaySdk.setHybridSDKVersion(sdkVersion)
|
|
76
|
+
}
|
|
77
|
+
|
|
72
78
|
@ReactMethod
|
|
73
79
|
fun init(sdkToken: String, promise: Promise) {
|
|
74
80
|
Log.d(TAG, "init: start")
|
package/ios/SmallcaseGateway.m
CHANGED
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
RCT_EXPORT_MODULE()
|
|
10
10
|
|
|
11
|
+
RCT_REMAP_METHOD(setHybridSdkVersion, sdkVersion: (NSString *)sdkVersion) {
|
|
12
|
+
[SCGateway.shared setSDKTypeWithType:@"react-native"];
|
|
13
|
+
[SCGateway.shared setHybridSDKVersionWithVersion:sdkVersion];
|
|
14
|
+
}
|
|
15
|
+
|
|
11
16
|
RCT_REMAP_METHOD(setConfigEnvironment,
|
|
12
17
|
envName:(NSString *)envName
|
|
13
18
|
gateway:(NSString *)gateway
|
|
@@ -75,8 +80,6 @@ RCT_REMAP_METHOD(init,
|
|
|
75
80
|
reject(@"init", @"Error during init", error);
|
|
76
81
|
}
|
|
77
82
|
}];
|
|
78
|
-
|
|
79
|
-
|
|
80
83
|
}
|
|
81
84
|
|
|
82
85
|
RCT_REMAP_METHOD(archiveSmallcase,
|
package/package.json
CHANGED
package/src/SmallcaseGateway.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NativeModules } from "react-native";
|
|
2
2
|
import { ENV } from "./constants";
|
|
3
3
|
import { safeObject } from "./util";
|
|
4
|
+
import { version } from "../package.json";
|
|
4
5
|
const { SmallcaseGateway: SmallcaseGatewayNative } = NativeModules;
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -34,6 +35,8 @@ let defaultBrokerList = [];
|
|
|
34
35
|
const setConfigEnvironment = async (envConfig) => {
|
|
35
36
|
const safeConfig = safeObject(envConfig);
|
|
36
37
|
|
|
38
|
+
await SmallcaseGatewayNative.setHybridSdkVersion(version);
|
|
39
|
+
|
|
37
40
|
const {
|
|
38
41
|
brokerList,
|
|
39
42
|
gatewayName,
|