Add Beneficiary bugs fixed #2
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:developer';
|
import 'dart:developer';
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:kmobile/core/errors/exceptions.dart';
|
||||||
import 'package:kmobile/data/models/ifsc.dart';
|
import 'package:kmobile/data/models/ifsc.dart';
|
||||||
import 'package:kmobile/data/models/beneficiary.dart';
|
import 'package:kmobile/data/models/beneficiary.dart';
|
||||||
|
|
||||||
@@ -40,8 +41,12 @@ class BeneficiaryService {
|
|||||||
if (e.response?.statusCode == 404) {
|
if (e.response?.statusCode == 404) {
|
||||||
throw Exception('INVALID IFSC CODE');
|
throw Exception('INVALID IFSC CODE');
|
||||||
}
|
}
|
||||||
|
else if (e.response?.statusCode == 401) {
|
||||||
|
throw Exception('INVALID IFSC CODE');
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
rethrow;
|
throw UnexpectedException(
|
||||||
|
'Unexpected error during login: ${e.toString()}');
|
||||||
}
|
}
|
||||||
return Ifsc.fromJson({});
|
return Ifsc.fromJson({});
|
||||||
}
|
}
|
||||||
@@ -118,4 +123,4 @@ class BeneficiaryService {
|
|||||||
throw Exception('Unexpected error: ${e.toString()}');
|
throw Exception('Unexpected error: ${e.toString()}');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -86,7 +86,6 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
|||||||
|
|
||||||
final String accountNo = accountNumberController.text.trim();
|
final String accountNo = accountNumberController.text.trim();
|
||||||
final String ifsc = ifscController.text.trim();
|
final String ifsc = ifscController.text.trim();
|
||||||
// ignore: prefer_const_declarations
|
|
||||||
final String remitter = "Unknown";
|
final String remitter = "Unknown";
|
||||||
|
|
||||||
final service = getIt<BeneficiaryService>();
|
final service = getIt<BeneficiaryService>();
|
||||||
|
@@ -15,13 +15,13 @@ void main() async {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
// Check for device compromise
|
// Check for device compromise
|
||||||
// final compromisedMessage = await SecurityService.deviceCompromisedMessage;
|
final compromisedMessage = await SecurityService.deviceCompromisedMessage;
|
||||||
// if (compromisedMessage != null) {
|
if (compromisedMessage != null) {
|
||||||
// runApp(MaterialApp(
|
runApp(MaterialApp(
|
||||||
// home: SecurityErrorScreen(message: compromisedMessage),
|
home: SecurityErrorScreen(message: compromisedMessage),
|
||||||
// ));
|
));
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// Initialize dependencies
|
// Initialize dependencies
|
||||||
await setupDependencies();
|
await setupDependencies();
|
||||||
|
Reference in New Issue
Block a user