From 9f41af82f718fc35192315fc5347a09681ff3780 Mon Sep 17 00:00:00 2001 From: Bibash Shrestha Date: Tue, 15 Aug 2023 13:28:11 +0545 Subject: [PATCH] refactor: Bug fix for test 6 --- .../qr_code/qr_code_scan/cubit/qr_code_scan_cubit.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/dashboard/qr_code/qr_code_scan/cubit/qr_code_scan_cubit.dart b/lib/dashboard/qr_code/qr_code_scan/cubit/qr_code_scan_cubit.dart index 28d9a0c63..c709e546e 100644 --- a/lib/dashboard/qr_code/qr_code_scan/cubit/qr_code_scan_cubit.dart +++ b/lib/dashboard/qr_code/qr_code_scan/cubit/qr_code_scan_cubit.dart @@ -530,7 +530,8 @@ class QRCodeScanCubit extends Cubit { } Future isVCPresentable( - PresentationDefinition? presentationDefinition) async { + PresentationDefinition? presentationDefinition, + ) async { if (presentationDefinition != null && presentationDefinition.inputDescriptors.isNotEmpty) { for (final descriptor in presentationDefinition.inputDescriptors) { @@ -548,8 +549,9 @@ class QRCodeScanCubit extends Cubit { final credentialName = credentialField['filter']['pattern'] as String; final isPresentable = await isCredentialPresentable(credentialName); - - return isPresentable; + if (!isPresentable) { + return false; + } } } return true;