Skip to content

Commit

Permalink
bugFix: Choose correct credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Aug 10, 2023
1 parent 5058832 commit b4b8b36
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,28 @@ class Oidc4vcCredentialPickView extends StatelessWidget {
horizontal: 16,
),
navigation: SafeArea(
child: Container(
padding: const EdgeInsets.all(16),
child: MyGradientButton(
onPressed: state.isEmpty
? null
: () {
if (state.isEmpty) return;
child: Container(
padding: const EdgeInsets.all(16),
child: MyGradientButton(
onPressed: state.isEmpty
? null
: () {
if (state.isEmpty) return;

final creds = <dynamic>[];
final creds = <dynamic>[];

for (int i = 0; i < state.length; i++) {
creds.add(credentials[i]);
}
for (final i in state) {
creds.add(credentials[i]);
}

context
.read<QRCodeScanCubit>()
.addCredentialsInLoop(creds);
},
text: l10n.proceed,
context
.read<QRCodeScanCubit>()
.addCredentialsInLoop(creds);
},
text: l10n.proceed,
),
),
)),
),
body: Column(
children: <Widget>[
...List.generate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ class QRCodeScanCubit extends Cubit<QRCodeScanState> {

if (currentOIIDC4VCType != null) {
final OIDC4VC oidc4vc = currentOIIDC4VCType.getOIDC4VC;

for (int i = 0; i < credentials.length; i++) {
emit(state.loading());
final credentialTypeOrId = credentials[i];
Expand Down

0 comments on commit b4b8b36

Please sign in to comment.