Skip to content

Commit

Permalink
Merge pull request #253 from tw-mosip/injiver-833-demo-changes
Browse files Browse the repository at this point in the history
[INJIVER-833] - move api URL construction to config
  • Loading branch information
sree96 authored Dec 3, 2024
2 parents 085a7bb + 39176f8 commit 650da41
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/public/env.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ OVP_QR_HEADER: "INJI_OVP://",
DEFAULT_FAVICON: "favicon.ico",
INTERNET_CONNECTIVITY_CHECK_ENDPOINT: "https://dns.google/",
INTERNET_CONNECTIVITY_CHECK_TIMEOUT: "10000",
VERIFY_SERVICE_API_URL: "/v1/verify",
VERIFY_SERVICE_API_URL: window.location.origin + "/v1/verify",
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ function VcDisplayCard(props: displayProps) {
title="Proceed"
className="w-[200px] lg:w-[350px] mb-20 lg:mb-6 text-lgNormalTextSize inline-flex"
onClick={() => {
console.log(props.loc);
window.location.href = (decodeURIComponent(`${props.loc.split("?")[1].split('=')[1]}`));
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/redux/features/verify/verifySaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function* fetchRequestUri(claims: string[]) {
const parsedData = JSON.parse(data) as QrData;
qrData =
OPENID4VP_PROTOCOL +
btoa(`client_id=${parsedData.authorizationDetails.clientId}&response_type=${parsedData.authorizationDetails.responseType}&response_mode=direct_post&nonce=${parsedData.authorizationDetails.nonce}&state=${parsedData.requestId}&response_uri=${window.location + window._env_.VERIFY_SERVICE_API_URL + parsedData.authorizationDetails.responseUri}&presentation_definition_uri=${ window.location + window._env_.VERIFY_SERVICE_API_URL + parsedData.authorizationDetails.presentationDefinitionUri}&client_metadata={"name":"${window.location}"}&presentation_definition=${JSON.stringify(pdef)}`);
btoa(`client_id=${parsedData.authorizationDetails.clientId}&response_type=${parsedData.authorizationDetails.responseType}&response_mode=direct_post&nonce=${parsedData.authorizationDetails.nonce}&state=${parsedData.requestId}&response_uri=${window._env_.VERIFY_SERVICE_API_URL + parsedData.authorizationDetails.responseUri}&presentation_definition_uri=${ window._env_.VERIFY_SERVICE_API_URL + parsedData.authorizationDetails.presentationDefinitionUri}&client_metadata={"name":"${window.location}"}&presentation_definition=${JSON.stringify(pdef)}`);
txnId = parsedData.transactionId;
reqId = parsedData.requestId;
} catch (error) {
Expand Down

0 comments on commit 650da41

Please sign in to comment.