Update: 2026-05-08 23:18:10

This commit is contained in:
Hamza-Ayed
2026-05-08 23:18:10 +03:00
parent 72424bf92c
commit 67cc322f5e
10 changed files with 99 additions and 23 deletions

View File

@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:freerasp/freerasp.dart';
import 'package:get/get.dart';
import 'package:flutter/foundation.dart';
/// Device Security Service
/// Enterprise-grade jailbreak/root/tamper detection for Musadaq using freeRASP.
@@ -71,6 +72,14 @@ class DeviceSecurityService extends GetxService {
/// Handle threat detection
void _onThreatDetected(String threat) {
debugPrint('[Security] ⚠️ THREAT: $threat');
// RELAXED SECURITY FOR DEBUGGING
// Only block the app in release mode or if explicitly requested.
if (kDebugMode) {
debugPrint('[Security] Skipping block due to kDebugMode');
return;
}
threatDetails.add(threat);
isCompromised.value = true;

View File

@@ -32,14 +32,14 @@ class HomeWidgetService extends GetxService {
/// Refresh widget data from API
Future<void> refreshWidgetData() async {
try {
final res = await DioClient().client.get('/v1/dashboard/stats');
final res = await DioClient().client.get('dashboard/stats');
if (res.data['success'] == true) {
final data = res.data['data'];
totalInvoices.value = data['invoices']?['total'] ?? 0;
pendingInvoices.value = data['invoices']?['pending'] ?? 0;
}
final subRes = await DioClient().client.get('/v1/subscriptions/current');
final subRes = await DioClient().client.get('subscriptions/current');
if (subRes.data['success'] == true) {
final sub = subRes.data['data'];
quotaUsed.value = sub['invoices']?['used'] ?? 0;