Skip to content

Commit

Permalink
Merge pull request #228 from velocitycareerlabs/VL-8229
Browse files Browse the repository at this point in the history
chore: move to staging
  • Loading branch information
michaelavoyan authored Jul 17, 2024
2 parents 4f4688f + 671753d commit 0329e1e
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 60 deletions.
23 changes: 11 additions & 12 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const enum InitState {
InitializationFailed,
}

const environment = VCLEnvironment.Dev;
const environment = VCLEnvironment.Staging;

const didJwkDescriptor: VCLDidJwkDescriptor = {
signatureAlgorithm: VCLSignatureAlgorithm.ES256,
Expand Down Expand Up @@ -200,7 +200,7 @@ export default () => {
const submitPresentation = (presentationRequest: VCLPresentationRequest) => {
const presentationSubmission: VCLPresentationSubmission = {
presentationRequest,
verifiableCredentials: Constants.PresentationSelectionsList,
verifiableCredentials: Constants.getIdentificationList(environment),
};
vcl.submitPresentation(presentationSubmission).then(
(presentationSubmissionResult: VCLSubmissionResult) => {
Expand Down Expand Up @@ -240,12 +240,11 @@ export default () => {
};

const searchForOrganizations = () => {
let organizationDescriptor =
Constants.OrganizationsSearchDescriptorByDidDev;
if (environment === VCLEnvironment.Staging.valueOf()) {
organizationDescriptor =
Constants.OrganizationsSearchDescriptorByDidStaging;
}
const organizationDescriptor =
environment === VCLEnvironment.Dev.valueOf() ?
Constants.OrganizationsSearchDescriptorByDidDev :
Constants.OrganizationsSearchDescriptorByDidStaging;

vcl.searchForOrganizations(organizationDescriptor).then(
(organizations: VCLOrganizations) => {
console.log(
Expand Down Expand Up @@ -342,7 +341,7 @@ export default () => {
const credentialManifestDescriptorRefresh: VCLCredentialManifestDescriptorRefresh =
{
service,
credentialIds: Constants.CredentialIdsToRefresh,
credentialIds: Constants.getCredentialIdsToRefresh(environment),
didJwk: didJwkRef.current,
};
vcl.getCredentialManifest(credentialManifestDescriptorRefresh).then(
Expand All @@ -368,7 +367,7 @@ export default () => {
const generateOffersDescriptor: VCLGenerateOffersDescriptor = {
credentialManifest,
types: Constants.CredentialTypes,
identificationVerifiableCredentials: Constants.IdentificationList,
identificationVerifiableCredentials: Constants.getIdentificationList(environment),
};

vcl.generateOffers(generateOffersDescriptor).then(
Expand Down Expand Up @@ -491,7 +490,7 @@ export default () => {
};

const getVerifiedProfile = () => {
vcl.getVerifiedProfile(Constants.VerifiedProfileDescriptor).then(
vcl.getVerifiedProfile(Constants.getVerifiedProfileDescriptor(environment)).then(
(verifiedProfile: VCLVerifiedProfile) => {
console.log('VCL Verified Profile: ', JSON.stringify(verifiedProfile));
},
Expand Down Expand Up @@ -584,7 +583,7 @@ export default () => {
onPress={getCredentialTypesUIFormSchema}
/>
<View style={styles.space} />
<Button title="Refresh Credentials" onPress={refreshCredentials} />
<Button title="Refresh Credentials" onPress={refreshCredentials} disabled />
<View style={styles.space} />
<Button title="Get Verified Profile" onPress={getVerifiedProfile} />
<View style={styles.space} />
Expand Down
Loading

0 comments on commit 0329e1e

Please sign in to comment.