Skip to content

Commit

Permalink
fix gh-actions build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedalichelbi committed Apr 12, 2024
1 parent 8def57f commit 0657d37
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/pages/verifier/tabs/admin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ export function AdminsTab() {

const fetchData = async () => {
const res = await getPresentations()
setPresentations(res.map((x, index) => {
x["id"] = index;
x["cred_schemas"] = x["cred_schemas"].map((y: string) => atob(y));
return x;
}));
setPresentations(res.map((x, index) => ({
...x,
id: index,
cred_schemas: x["cred_schemas"].map((y: string) => atob(y)),

})));
}

const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
Expand Down
11 changes: 10 additions & 1 deletion src/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,16 @@ export async function getProofStatus(taskId: number): Promise<object> {
return (await fetch(`${getBackendUrl()}/holder/proof/status/${taskId}`)).json()
}

export async function getPresentations(): Promise<object[]> {
type Request = {
status: string,
cred_hashes: string[],
cred_schemas: string[],
lang: string,
script: string,
result: boolean,
};

export async function getPresentations(): Promise<Request[]> {
return (await fetch(`${getBackendUrl()}/verifier/presentations`)).json()
}

Expand Down

0 comments on commit 0657d37

Please sign in to comment.