diff --git a/src/helpers/getBatchOfEntanglementsHashes.ts b/src/helpers/getBatchOfEntanglementsHashes.ts index cdbaa6a..ce4e4a7 100644 --- a/src/helpers/getBatchOfEntanglementsHashes.ts +++ b/src/helpers/getBatchOfEntanglementsHashes.ts @@ -41,15 +41,15 @@ export default async function getBatchOfEntanglementsHashes( type ) + if (hashIndex === -1) { + throw new Error(`This hash isn't among those added to the blockchain`) + } + if (isUsedAttestation && hashIndex === -1) throw new Error( `This verification method has already been used for another account!` ) - if (hashIndex === -1) { - throw new Error(`This hash isn't among those added to the blockchain`) - } - if (batchSize > filteredEntanglements.length) throw new Error(`Batch hasn't been completed`)