react-native-shield-fraud-plugin 1.0.8 → 1.0.9
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.
|
@@ -180,16 +180,15 @@ public class ShieldFraudPluginModule extends ReactContextBaseJavaModule implemen
|
|
|
180
180
|
|
|
181
181
|
@ReactMethod
|
|
182
182
|
public void getLatestDeviceResult(Callback successCallback, Callback errorCallback) {
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
Shield shieldInstance = Shield.getInstance();
|
|
184
|
+
JSONObject deviceResult = shieldInstance.getLatestDeviceResult();
|
|
185
|
+
|
|
186
|
+
if (deviceResult != null) {
|
|
185
187
|
successCallback.invoke(deviceResult.toString());
|
|
186
188
|
} else {
|
|
187
|
-
ShieldException error =
|
|
188
|
-
String errorMessage = "unknown error";
|
|
189
|
-
if (error != null) {
|
|
190
|
-
errorMessage = error.getMessage();
|
|
191
|
-
}
|
|
189
|
+
ShieldException error = shieldInstance.getResponseError();
|
|
190
|
+
String errorMessage = (error != null) ? error.getMessage() : "unknown error";
|
|
192
191
|
errorCallback.invoke(errorMessage);
|
|
193
192
|
}
|
|
194
|
-
}
|
|
193
|
+
}
|
|
195
194
|
}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-shield-fraud-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "React Native Shield Fraud Plugin helps developers to assess malicious activities performed on mobile devices and return risk intelligence based on user's behaviour. It collects device's fingerprint, social metrics and network information.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|