Update: 2026-06-26 01:10:36

This commit is contained in:
Hamza-Ayed
2026-06-26 01:10:36 +03:00
parent 595ae99e1d
commit a9e2ee1a58
6 changed files with 84 additions and 106 deletions

View File

@@ -244,7 +244,13 @@ class CRUD {
}
// Initialize app signature if null
_appSignature ??= await SecurityHelper.getAppSignature();
if (_appSignature == null) {
try {
_appSignature = await SecurityHelper.getAppSignature();
} catch (_) {
_appSignature = '';
}
}
final headers = {
'Content-Type': 'application/x-www-form-urlencoded',
@@ -277,7 +283,13 @@ class CRUD {
};
// Initialize app signature if null
_appSignature ??= await SecurityHelper.getAppSignature();
if (_appSignature == null) {
try {
_appSignature = await SecurityHelper.getAppSignature();
} catch (_) {
_appSignature = '';
}
}
final headers = {
'Content-Type': 'application/x-www-form-urlencoded',

View File

@@ -14,6 +14,9 @@ class SecurityHelper {
Log.print('----------------------------------------------------');
return signature;
} on MissingPluginException {
Log.print('⚠️ getAppSignature not implemented on this platform');
return null;
} on PlatformException catch (e) {
Log.print('❌ Failed to get app signature: ${e.message}');
return null;
@@ -24,6 +27,8 @@ class SecurityHelper {
try {
final bool isRooted = await platform.invokeMethod('isNativeRooted');
return isRooted;
} on MissingPluginException {
return false;
} on PlatformException catch (e) {
Log.print('❌ Failed to check root: ${e.message}');
return false;