diff --git a/lib/api/services/beneficiary_service.dart b/lib/api/services/beneficiary_service.dart index 52094ca..912b943 100644 --- a/lib/api/services/beneficiary_service.dart +++ b/lib/api/services/beneficiary_service.dart @@ -64,6 +64,10 @@ class BeneficiaryService { 'ifscCode': ifscCode, 'remitterName': remitterName, }, + options: Options( + sendTimeout: const Duration(seconds: 60), + receiveTimeout: const Duration(seconds: 60), + ), ); if (response.statusCode != 200) { throw Exception("Invalid Beneficiary Details"); diff --git a/lib/di/injection.dart b/lib/di/injection.dart index fd466e7..c334e5c 100644 --- a/lib/di/injection.dart +++ b/lib/di/injection.dart @@ -65,10 +65,11 @@ Dio _createDioClient() { final dio = Dio( BaseOptions( baseUrl: - //'http://lb-test-mobile-banking-app-192209417.ap-south-1.elb.amazonaws.com:8080', - 'http://lb-kccb-mobile-banking-app-848675342.ap-south-1.elb.amazonaws.com', - connectTimeout: const Duration(seconds: 5), - receiveTimeout: const Duration(seconds: 10), + //'http://lb-test-mobile-banking-app-192209417.ap-south-1.elb.amazonaws.com:8080', //test + 'http://lb-kccb-mobile-banking-app-848675342.ap-south-1.elb.amazonaws.com', //prod + + connectTimeout: const Duration(seconds: 60), + receiveTimeout: const Duration(seconds: 60), headers: { 'Content-Type': 'application/json', 'Accept': 'application/json', diff --git a/lib/features/auth/screens/set_password_screen.dart b/lib/features/auth/screens/set_password_screen.dart index 92be727..0a8a82e 100644 --- a/lib/features/auth/screens/set_password_screen.dart +++ b/lib/features/auth/screens/set_password_screen.dart @@ -3,6 +3,8 @@ import 'package:kmobile/api/services/auth_service.dart'; import 'package:kmobile/di/injection.dart'; import 'package:kmobile/features/auth/screens/login_screen.dart'; +import '../../../l10n/app_localizations.dart'; + class SetPasswordScreen extends StatefulWidget { final String customerNo; const SetPasswordScreen({super.key, required this.customerNo}); @@ -75,7 +77,7 @@ class _SetPasswordScreenState extends State { }); } catch (e) { setState(() { - _error = e.toString(); + _error = AppLocalizations.of(context).invalidOtp; _isLoading = false; }); } @@ -138,7 +140,9 @@ class _SetPasswordScreenState extends State { if (_error != null) ...[ Text( _error!, - style: const TextStyle(color: Colors.red), + style: const TextStyle(color: Colors.red, + fontWeight: FontWeight.bold, + fontSize: 20), textAlign: TextAlign.center, ), const SizedBox(height: 16), diff --git a/lib/features/fund_transfer/screens/tpin_prompt_screen.dart b/lib/features/fund_transfer/screens/tpin_prompt_screen.dart index 0af4331..00f5c99 100644 --- a/lib/features/fund_transfer/screens/tpin_prompt_screen.dart +++ b/lib/features/fund_transfer/screens/tpin_prompt_screen.dart @@ -32,7 +32,7 @@ class TpinSetupPromptScreen extends StatefulWidget { mobileNumberToPass = authState.users[selectedAccountIndex].mobileNo ?? ''; } } - await _changePasswordService.getOtp(mobileNumber: mobileNumberToPass); + await _changePasswordService.getOtpTpin(mobileNumber: mobileNumberToPass); if (mounted) { Navigator.pushReplacement( context, diff --git a/lib/features/profile/change_password/change_password_otp_screen.dart b/lib/features/profile/change_password/change_password_otp_screen.dart index 88a2566..5ca964b 100644 --- a/lib/features/profile/change_password/change_password_otp_screen.dart +++ b/lib/features/profile/change_password/change_password_otp_screen.dart @@ -60,7 +60,7 @@ class _ChangePasswordOTPScreenState extends State { } catch (e) { ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text('${AppLocalizations.of(context).failedToValidate}: $e')), + SnackBar(content: Text(AppLocalizations.of(context).invalidOtp)), ); } } diff --git a/lib/main.dart b/lib/main.dart index ad4c61c..a62f353 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -17,13 +17,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();