Add Beneficiary bugs fixed #2

This commit is contained in:
2025-09-05 18:15:19 +05:30
parent be9a6fc93f
commit 1204507375
3 changed files with 14 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
import 'dart:developer';
import 'package:dio/dio.dart';
import 'package:kmobile/core/errors/exceptions.dart';
import 'package:kmobile/data/models/ifsc.dart';
import 'package:kmobile/data/models/beneficiary.dart';
@@ -40,8 +41,12 @@ class BeneficiaryService {
if (e.response?.statusCode == 404) {
throw Exception('INVALID IFSC CODE');
}
else if (e.response?.statusCode == 401) {
throw Exception('INVALID IFSC CODE');
}
} catch (e) {
rethrow;
throw UnexpectedException(
'Unexpected error during login: ${e.toString()}');
}
return Ifsc.fromJson({});
}

View File

@@ -86,7 +86,6 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
final String accountNo = accountNumberController.text.trim();
final String ifsc = ifscController.text.trim();
// ignore: prefer_const_declarations
final String remitter = "Unknown";
final service = getIt<BeneficiaryService>();

View File

@@ -15,13 +15,13 @@ void main() async {
]);
// Check for device compromise
// final compromisedMessage = await SecurityService.deviceCompromisedMessage;
// if (compromisedMessage != null) {
// runApp(MaterialApp(
// home: SecurityErrorScreen(message: compromisedMessage),
// ));
// return;
// }
final compromisedMessage = await SecurityService.deviceCompromisedMessage;
if (compromisedMessage != null) {
runApp(MaterialApp(
home: SecurityErrorScreen(message: compromisedMessage),
));
return;
}
// Initialize dependencies
await setupDependencies();