Skip to content

Commit 6c47e35

Browse files
committed
fix: presentation mobile view milti cred case
1 parent ac9d7a8 commit 6c47e35

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/pages/History/HistoryDetail.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import SessionContext from '../../context/SessionContext';
1010

1111
// Utility functions
1212
import { formatDate } from '../../functions/DateFormat';
13+
import { fromBase64 } from '../../util';
1314

1415
// Hooks
1516
import useFetchPresentations from '../../hooks/useFetchPresentations';
@@ -28,8 +29,10 @@ const HistoryDetail = () => {
2829

2930
useEffect(() => {
3031
if (history.length > 0) {
31-
const verifiableCredentials = [history[0].presentation];
32-
setMatchingCredentials(verifiableCredentials);
32+
setMatchingCredentials(history[0].presentation.startsWith("b64:") ?
33+
[...JSON.parse(new TextDecoder().decode(fromBase64(history[0].presentation.replace("b64:", ""))))] :
34+
[history[0].presentation]
35+
);
3336
}
3437
}, [history]);
3538

0 commit comments

Comments
 (0)