react-native-smallcase-gateway 1.6.0 → 1.6.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.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
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.6.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.5.4...v1.6.1) (2022-10-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* 1014 err msg added ([04bc4de](https://github.com/smallcase/react-native-smallcase-gateway/commit/04bc4de8dcd3a7a37d6f0d15eee5aeeb34419195))
|
|
11
|
+
* add bridge method for mf holdings ([b68b570](https://github.com/smallcase/react-native-smallcase-gateway/commit/b68b57062ed514dc46404f94191c3ee438f184dc))
|
|
12
|
+
|
|
5
13
|
## [1.6.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.5.4...v1.6.0) (2022-09-23)
|
|
6
14
|
|
|
7
15
|
### [1.5.4](https://github.com/smallcase/react-native-smallcase-gateway/compare/v1.5.2...v1.5.4) (2022-09-08)
|
package/android/build.gradle
CHANGED
|
@@ -81,7 +81,7 @@ repositories {
|
|
|
81
81
|
dependencies {
|
|
82
82
|
//noinspection GradleDynamicVersion
|
|
83
83
|
implementation 'com.facebook.react:react-native:+' // From node_modules
|
|
84
|
-
implementation 'com.smallcase.gateway:sdk:3.6.
|
|
84
|
+
implementation 'com.smallcase.gateway:sdk:3.6.4'
|
|
85
85
|
implementation "androidx.core:core-ktx:1.3.1"
|
|
86
86
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
87
87
|
}
|
|
@@ -115,30 +115,30 @@ class SmallcaseGatewayModule(reactContext: ReactApplicationContext?) : ReactCont
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
118
|
+
@ReactMethod
|
|
119
|
+
fun triggerMfTransaction(transactionId: String, promise: Promise) {
|
|
120
|
+
|
|
121
|
+
if(currentActivity != null) {
|
|
122
|
+
|
|
123
|
+
SmallcaseGatewaySdk.triggerMfTransaction(
|
|
124
|
+
activity = currentActivity!!,
|
|
125
|
+
transactionId = transactionId,
|
|
126
|
+
listener = object : MFHoldingsResponseListener {
|
|
127
|
+
|
|
128
|
+
override fun onSuccess(transactionResult: TransactionResult) {
|
|
129
|
+
val res = resultToWritableMap(transactionResult, true)
|
|
130
|
+
promise.resolve(res)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
override fun onError(errorCode: Int, errorMessage: String, data: String?) {
|
|
134
|
+
val err = createErrorJSON(errorCode, errorMessage, data)
|
|
135
|
+
promise.reject("error", err)
|
|
136
|
+
}
|
|
137
|
+
})
|
|
138
|
+
} else {
|
|
139
|
+
promise.reject(Throwable("no activity"))
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
142
|
|
|
143
143
|
@ReactMethod
|
|
144
144
|
fun showOrders(promise: Promise) {
|
package/package.json
CHANGED
package/src/SmallcaseGateway.js
CHANGED
|
@@ -110,13 +110,13 @@ const triggerTransaction = async (transactionId, utmParams, brokerList) => {
|
|
|
110
110
|
* @param {string} transactionId
|
|
111
111
|
* @returns {Promise<transactionRes>}
|
|
112
112
|
*/
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
const triggerMfTransaction = async (transactionId) => {
|
|
114
|
+
const safeTransactionId = typeof transactionId === "string" ? transactionId : "";
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
return SmallcaseGatewayNative.triggerMfTransaction(
|
|
117
|
+
safeTransactionId
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
122
|
* launches smallcases module
|
package/src/constants.js
CHANGED