Fixes & Updates - 2026-06-01: Integrate Back-End v3 updates, fix call/connection issues across apps
This commit is contained in:
@@ -6,7 +6,7 @@ import '../../print.dart';
|
||||
|
||||
class FinancialV2Controller extends GetxController {
|
||||
bool isLoading = true;
|
||||
|
||||
|
||||
Map<String, dynamic> stats = {};
|
||||
List<dynamic> settlements = [];
|
||||
|
||||
@@ -19,19 +19,20 @@ class FinancialV2Controller extends GetxController {
|
||||
Future<void> fetchAllFinancials() async {
|
||||
isLoading = true;
|
||||
update();
|
||||
|
||||
|
||||
await Future.wait([
|
||||
fetchStats(),
|
||||
fetchSettlements(),
|
||||
]);
|
||||
|
||||
|
||||
isLoading = false;
|
||||
update();
|
||||
}
|
||||
|
||||
Future<void> fetchStats() async {
|
||||
try {
|
||||
var res = await CRUD().get(link: AppLink.financialStatsV2, payload: {});
|
||||
var res =
|
||||
await CRUD().getWallet(link: AppLink.financialStatsV2, payload: {});
|
||||
if (res != 'failure' && res != null) {
|
||||
var d = res is String ? jsonDecode(res) : res;
|
||||
if (d['status'] == 'success') {
|
||||
@@ -45,7 +46,8 @@ class FinancialV2Controller extends GetxController {
|
||||
|
||||
Future<void> fetchSettlements() async {
|
||||
try {
|
||||
var res = await CRUD().get(link: AppLink.settlementsV2, payload: {});
|
||||
var res =
|
||||
await CRUD().getWallet(link: AppLink.settlementsV2, payload: {});
|
||||
if (res != 'failure' && res != null) {
|
||||
var d = res is String ? jsonDecode(res) : res;
|
||||
if (d['status'] == 'success') {
|
||||
|
||||
Reference in New Issue
Block a user