Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: multiple connections selection for proof request #826

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion src/api/verification.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { IssueCredential, RequestType } from '../common/enums';
import { APIVersion, type IssueCredential, type RequestType } from '../common/enums';
import { apiRoutes } from '../config/apiRoutes';
import { storageKeys } from '../config/CommonConstant';
import { getHeaderConfigs } from '../config/GetHeaderConfigs';
Expand All @@ -23,6 +23,24 @@ export const verifyCredential = async (payload: object, requestType:RequestType)
}
};


export const verifyCredentialV2 = async (payload: object, requestType:RequestType) => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);
const url = `${APIVersion.version_v2}${apiRoutes.organizations.root}/${orgId}${apiRoutes.Verification.verifyCredential}?requestType=${requestType}`;
const axiosPayload = {
url,
payload,
config: await getHeaderConfigs(),
};

try {
return await axiosPost(axiosPayload);
} catch (error) {
const err = error as Error;
return err?.message;
}
};

export const createOobProofRequest = async (payload: object, requestType: RequestType) => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);
const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Verification.oobProofRequest}?requestType=${requestType}`;
Expand Down
4 changes: 4 additions & 0 deletions src/common/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,8 @@ export enum Environment {
PROD = 'PROD',
DEV = 'DEV',
QA = 'QA'
}

export enum APIVersion {
version_v2 = '/v2'
}
4 changes: 2 additions & 2 deletions src/commonComponents/datatable/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface TableHeader {
width?: string;
}

export interface TableData {
export interface ITableData {
clickId?: string | null;
data: Data[];
}
Expand All @@ -20,7 +20,7 @@ export interface Data {

export interface IDataTable {
header: TableHeader[];
data: TableData[];
data: ITableData[];
loading: boolean;
onInputChange: (e: ChangeEvent<HTMLInputElement>) => void;
refresh: () => void;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Issuance/Connections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,4 @@ useEffect(() => {
);
};

export default Connections;
export default Connections;
Loading
Loading