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

Add credit check filter to Quotient loan template #27

Merged
merged 6 commits into from
Jul 19, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@
"const": "EquiNetCreditScore"
},
"predicate": "required"
},
{
"path": [
"$.credentialSubject.credit_score"
],
"filter": {
"type": "number",
"exclusiveMinimum": 700
},
"predicate": "required"
}
]
}
Expand Down
7 changes: 4 additions & 3 deletions scripts/download-ecosystem.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ async function downloadProofRequestTemplates(ecosystemId, folder) {
});
}

export function downloadProofRequests() {
export async function downloadProofRequests() {
await fs.mkdir('data/proof-requests');
console.log('--- Downloading proof request templates from Certs ---');

const proofTemplateUrl = `${process.env.DOCK_API_URL}/proof-templates/`;
Expand All @@ -138,5 +139,5 @@ if (!process.env.DOCK_API_TOKEN) {
throw new Error("Please configure the DOCK_API_TOKEN setting in the project's .env file.");
}

downloadEcosystems();
// downloadProofRequests();
await downloadEcosystems();
await downloadProofRequests();
8 changes: 7 additions & 1 deletion scripts/setup-certs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ async function createProfiles() {

await waitForJob(didResponse.data.id, axiosHeaders);
profile.did = didResponse.data.did;
const profileResponse = await axios.post(profilesUrl, profile, axiosHeaders);
const profileBody = {
name: profile.name,
did: didResponse.data.did,
logo: profile.logo,
description: profile.description
};
const profileResponse = await axios.post(profilesUrl, profileBody, axiosHeaders);
if (profile.isParticipant) {
participantProfiles[scrubForFilename(profile.name)] = profileResponse.data;
}
Expand Down
Loading