Skip to content

Commit

Permalink
horrible hack to turn biometric.data into a string to satisfy the sch…
Browse files Browse the repository at this point in the history
…ema (#30)

* horrible hack to turn biometric.data into a string to satisfy the schema
  • Loading branch information
mike-parkhill authored Jul 29, 2024
1 parent e6e6fd4 commit 443a727
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pages/org/quotient/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,14 @@ const QuotientBankForm = () => {
function getBiometricalData() {
if (retrievedData !== null) {
const credential = retrievedData.credentials.find((obj) => Object.prototype.hasOwnProperty.call(obj.credentialSubject, 'biometric'));
if (credential) return credential.credentialSubject.biometric;

// TODO: get wallet to return a string rather than a boolean so we don't have to do this hack
const biometric = credential?.credentialSubject?.biometric;

if (biometric) {
biometric.data = biometric.data?.toString();
return biometric;
}
}
return null;
}
Expand Down

0 comments on commit 443a727

Please sign in to comment.