-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix revocation bug and some minor tweaks to spelling, etc. (#19)
* fix path to issued VC id * fix bank account address state mapping issue * make bank id values match driver license * fix typo and add empty option for Suffix field * remove terive reference
- Loading branch information
1 parent
cd97a41
commit b618910
Showing
6 changed files
with
36 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
const qrCodeVerificationData = { | ||
LOAN: { | ||
title: "Instant approval by authenticating with your mobile banking app and providing the needed credentials including a validated credit score over 700.", | ||
qrText: "Scan the QR code below with your terive mobile banking app.", | ||
title: 'Instant approval by authenticating with your mobile banking app and providing the needed credentials including a validated credit score over 700.', | ||
qrText: 'Scan the QR code below with your Quotient mobile banking app.', | ||
qrTextAfter: null | ||
}, | ||
BANK: { | ||
title: null, | ||
qrText: "Scan this QR code with your mobile bank app to log in the app and receive these benefits.", | ||
qrTextAfter: "You will be required to provide a biometric on your mobile device in order to receive these credentials." | ||
qrText: 'Scan this QR code with your mobile bank app to log in the app and receive these benefits.', | ||
qrTextAfter: 'You will be required to provide a biometric on your mobile device in order to receive these credentials.' | ||
}, | ||
URBAN_BANKBIO: { | ||
title: null, | ||
qrText: "Automate approval by using your mobile banking app to complete this form with verified information. Approval guaranteed with a credit score over 600.", | ||
qrText: 'Automate approval by using your mobile banking app to complete this form with verified information. Approval guaranteed with a credit score over 600.', | ||
qrTextAfter: null | ||
}, | ||
URBAN_CREDITSCORE: { | ||
title: null, | ||
qrText: "Scan QR code with you mobile app to see if you qualify for a waived deposit.", | ||
qrText: 'Scan QR code with your mobile app to see if you qualify for a waived deposit.', | ||
qrTextAfter: null | ||
}, | ||
|
||
} | ||
}; | ||
|
||
export default qrCodeVerificationData; | ||
export default qrCodeVerificationData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
import { toast } from 'sonner'; | ||
import { createRegistry } from './dock-registries'; | ||
import { createCredential } from './dock-credentials'; | ||
import { waitForJobCompletion } from './dock-jobs'; | ||
import { toast } from 'sonner'; | ||
|
||
export const issueRevokableCredential = async (credential, setRevokableCredential, isRevocable) => { | ||
|
||
const credentialPayload = credential; | ||
const _credential = credentialPayload.credential; | ||
|
||
let registry = null; | ||
if (isRevocable) { | ||
const type = credentialPayload.algorithm === 'dockbbs+' ? 'DockVBAccumulator2022' : 'StatusList2021Entry'; | ||
//CREATING REGISTRY | ||
// CREATING REGISTRY | ||
registry = await createRegistry(_credential.issuer.id, type); | ||
//WAITING FOR REGISTRY JOB CONFIRMATION | ||
// WAITING FOR REGISTRY JOB CONFIRMATION | ||
await waitForJobCompletion(registry.id); | ||
} | ||
|
||
//SIGNING CREDENTIAL | ||
// SIGNING CREDENTIAL | ||
const signed = await createCredential(registry?.data?.id, credentialPayload); | ||
|
||
if (isRevocable) { | ||
console.log(signed); | ||
setRevokableCredential({ | ||
registryId: registry.data.id, | ||
credentialId: signed.id, | ||
credentialId: signed.data.id, | ||
userDid: _credential.subject.id | ||
}); | ||
console.log('setting Revokable credential set in localStorage'); | ||
} | ||
|
||
toast.success(`Issued ${_credential.name} credential`, { duration: 10000 }) | ||
return signed; | ||
toast.success(`Issued ${_credential.name} credential`, { duration: 10000 }); | ||
return signed.data; | ||
}; |