usability fixes

This commit is contained in:
2026-06-01 20:49:53 +02:00
parent 7b5b962fe6
commit 1d8ab2088c
6 changed files with 167 additions and 38 deletions

View File

@@ -73,7 +73,9 @@ class PayController extends ChangeNotifier {
// formData can come from a repeat transaction
// otherwise build it from elements of the normal flow
Future<ApiResponse<Map<String, dynamic>>> doTransaction([tc.FormData? formData]) async {
Future<ApiResponse<Map<String, dynamic>>> doTransaction([
tc.FormData? formData,
]) async {
try {
model.isLoading = true;
notifyListeners();
@@ -129,7 +131,9 @@ class PayController extends ChangeNotifier {
logger.e(s);
model.isLoading = false;
notifyListeners();
return ApiResponse.failure("Network error. Please try again or contact support");
return ApiResponse.failure(
"Network error. Please try again or contact support",
);
} catch (e, s) {
logger.e(s);
model.isLoading = false;
@@ -170,8 +174,9 @@ class PayController extends ChangeNotifier {
notifyListeners();
List<dynamic> response = await http.get('/public/payment-processors');
model.paymentProcessors =
response.map((e) => PaymentProcessor.fromJson(e)).toList();
model.paymentProcessors = response
.map((e) => PaymentProcessor.fromJson(e))
.toList();
model.isLoading = false;
notifyListeners();