-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
183 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...raph/graph/contexts/d7cfce00f08fa1cbd4c58cf5ee60c6a0398aeae1f908621625e61477be878579.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import { default as cab4ddd9a531758807a79a5b450510d61ae8d147eab966cc9a200c07095b0cdcc } from "./ab4ddd9a531758807a79a5b450510d61ae8d147eab966cc9a200c07095b0cdcc.json" | ||
import { default as c24a18c90e9856d526111f29376e302d970b2bd10182e33959995b0207d7043b9 } from "./24a18c90e9856d526111f29376e302d970b2bd10182e33959995b0207d7043b9.json" | ||
import { default as c57393fbc69d6efb9b9b5dc9cb6b9880b0944360abfe2eaf459c9e58cf2279d7c } from "./57393fbc69d6efb9b9b5dc9cb6b9880b0944360abfe2eaf459c9e58cf2279d7c.json" | ||
import { default as cd7cfce00f08fa1cbd4c58cf5ee60c6a0398aeae1f908621625e61477be878579 } from "./d7cfce00f08fa1cbd4c58cf5ee60c6a0398aeae1f908621625e61477be878579.json" | ||
export const contexts = { | ||
"https://www.w3.org/2018/credentials/v1": cab4ddd9a531758807a79a5b450510d61ae8d147eab966cc9a200c07095b0cdcc, | ||
"https://www.w3.org/ns/credentials/v2": c24a18c90e9856d526111f29376e302d970b2bd10182e33959995b0207d7043b9, | ||
"https://www.w3.org/ns/credentials/examples/v2": c57393fbc69d6efb9b9b5dc9cb6b9880b0944360abfe2eaf459c9e58cf2279d7c, | ||
"https://w3id.org/traceability/v1": cd7cfce00f08fa1cbd4c58cf5ee60c6a0398aeae1f908621625e61477be878579, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
export const getPresentations = async ({ sent, received, api }: any) => { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const results: any = { items: [] } | ||
if (received) { | ||
const response = await api.presentations.getPresentationsSharedWithMe() | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const data = response.data as any | ||
if (response.data) { | ||
results.page = data.page | ||
results.count = data.count | ||
results.items = [ | ||
...results.items, | ||
...data.items.map((p) => { | ||
return { id: p.id, content: p.verifiablePresentation } | ||
}), | ||
] | ||
} | ||
} | ||
if (sent) { | ||
const response = await api.presentations.getPresentationsSharedWithOthers() | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const data = response.data as any | ||
if (response.data) { | ||
results.page = data.page | ||
results.count = data.count | ||
results.items = [ | ||
...results.items, | ||
...data.items.map((p) => { | ||
return { id: p.id, content: p.verifiablePresentation } | ||
}), | ||
] | ||
} | ||
// in case both are passed, these values don't make sense... | ||
if (received) { | ||
delete results.page | ||
delete results.count | ||
} | ||
} | ||
return results | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters