Skip to content

Commit 765bb87

Browse files
committedMar 19, 2025
Wallet fails for presentation with double nested json #3281
1 parent d499be8 commit 765bb87

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed
 

‎lib/selective_disclosure/helper_functions/selective_disclosure_display_map.dart

+7-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class SelectiveDisclosureDisplayMap {
6565
final bool hasNestedData =
6666
mapValue.values.any((element) => element is Map<String, dynamic>);
6767

68-
if (hasNestedData && parentKeyId == null) {
68+
if (hasNestedData) {
6969
final nestedMap = SelectiveDisclosureDisplayMap(
7070
credentialModel: credentialModel,
7171
claims: mapValue,
@@ -80,7 +80,12 @@ class SelectiveDisclosureDisplayMap {
8080
displayMode: displayMode,
8181
).buildMap;
8282
if (nestedMap.isNotEmpty) {
83-
builtMap[title] = nestedMap;
83+
final fundation = claimData(mapKey, title, type, parentKeyId);
84+
final fundationValue = fundation.values.first;
85+
fundationValue['value'] = nestedMap;
86+
builtMap.addAll(
87+
{fundation.keys.first: fundationValue},
88+
);
8489
} else {
8590
builtMap.addAll(
8691
claimData(mapKey, title, type, parentKeyId),

0 commit comments

Comments
 (0)