Skip to content

Commit

Permalink
chore: resolve code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
SinanovicEdis committed Jan 12, 2025
1 parent ac5fab1 commit 057fe9e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 155 deletions.
1 change: 0 additions & 1 deletion packages/dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"@vercel/speed-insights": "^1.0.10",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"crypto-js": "^4.2.0",
"date-fns": "^3.6.0",
"did-jwt-vc": "^3.2.13",
"did-resolver": "4.1.0",
Expand Down
30 changes: 15 additions & 15 deletions packages/dapp/src/components/ShareCredentialModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,22 +140,22 @@ export const ShareCredentialModal = () => {
presentationFrame: selectedSdJwtDisclosures,
});

if (selectedProofFormat === 'sd-jwt') {
if (createPresentationResult.success) {
const presentationsArray: string[] = [];

if ('presentations' in createPresentationResult.data) {
createPresentationResult.data.presentations.map(
(presentation: { presentation: string }) => {
presentationsArray.push(presentation.presentation);
}
);
}

createPresentationResult = await api.decodeSdJwtPresentation({
presentation: presentationsArray,
});
if (
selectedProofFormat === 'sd-jwt' &&
createPresentationResult.success
) {
let presentationsArray: string[] = [];

if ('presentations' in createPresentationResult.data) {
presentationsArray = createPresentationResult.data.presentations.map(
(presentation: { presentation: string }) =>
presentation.presentation
);
}

createPresentationResult = await api.decodeSdJwtPresentation({
presentation: presentationsArray,
});
}
} catch (e: any) {
console.log(e);
Expand Down
2 changes: 1 addition & 1 deletion packages/snap/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"./files/circuits/credentialAtomicQuerySigV2/circuit_final.zkey",
"./files/circuits/credentialAtomicQuerySigV2/verification_key.json"
],
"shasum": "GTYjZxSFal5+bIf44cC89/6SoRp7RBrPZdcrERTt9QA="
"shasum": "Z1QJ7cWIiA06KdzQkmK2kbVaZKqVnXAQocT2MBxGU50="
},
"initialPermissions": {
"endowment:ethereum-provider": {},
Expand Down
Loading

0 comments on commit 057fe9e

Please sign in to comment.