Remove redundant 'await' when returning in verifications.js

This commit is contained in:
Tyler Beckman 2024-10-12 01:33:12 -06:00 committed by Yarmo Mackenbach
parent 70d8b307a1
commit 72d2a4a869
No known key found for this signature in database
GPG key ID: C248C28D432560ED

View file

@ -226,7 +226,7 @@ const runJSON = async (proofData, checkPath, params) => {
}
if (typeof proofData === 'object' && !Array.isArray(proofData) && checkPath[0] === '*') {
return await runJSON(Object.values(proofData), checkPath.slice(1), params)
return runJSON(Object.values(proofData), checkPath.slice(1), params)
}
if (Array.isArray(proofData)) {
@ -248,12 +248,12 @@ const runJSON = async (proofData, checkPath, params) => {
if (checkPath.length === 0) {
switch (params.claimRelation) {
case ClaimRelation.ONEOF:
return await containsProof(proofData.join('|'), params)
return containsProof(proofData.join('|'), params)
case ClaimRelation.CONTAINS:
case ClaimRelation.EQUALS:
default:
return await containsProof(proofData, params)
return containsProof(proofData, params)
}
}
@ -261,7 +261,7 @@ const runJSON = async (proofData, checkPath, params) => {
throw new Error('err_json_structure_incorrect')
}
return await runJSON(
return runJSON(
proofData[checkPath[0]],
checkPath.slice(1),
params