From 5c90bd622c57e6f7ce26c331041dc24e849f337d Mon Sep 17 00:00:00 2001 From: brkagithub Date: Thu, 19 Dec 2024 17:46:34 +0100 Subject: [PATCH] remove validation for v6 cient --- src/commands/common/validate-asset-command.js | 23 ------------------- .../get/sender/get-validate-asset-command.js | 6 +---- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/src/commands/common/validate-asset-command.js b/src/commands/common/validate-asset-command.js index 8b801ebd6..d18179797 100644 --- a/src/commands/common/validate-asset-command.js +++ b/src/commands/common/validate-asset-command.js @@ -3,7 +3,6 @@ import { ERROR_TYPE, OPERATION_ID_STATUS, LOCAL_STORE_TYPES, - ZERO_BYTES32, PARANET_ACCESS_POLICY, } from '../../constants/constants.js'; @@ -39,15 +38,6 @@ class ValidateAssetCommand extends Command { OPERATION_ID_STATUS.VALIDATE_ASSET_START, ); - const blockchainAssertionId = - await this.blockchainModuleManager.getKnowledgeCollectionLatestMerkleRoot( - blockchain, - contract, - tokenId, - ); - if (!blockchainAssertionId || blockchainAssertionId === ZERO_BYTES32) { - return Command.retry(); - } // TODO: Validate number of triplets and other stuff we did before so it matches like we did it in v6 const cachedData = await this.operationIdService.getCachedOperationIdData(operationId); const ual = this.ualService.deriveUAL(blockchain, contract, tokenId); @@ -55,19 +45,6 @@ class ValidateAssetCommand extends Command { // backwards compatibility const cachedAssertion = cachedData.datasetRoot || cachedData.public.assertionId; const cachedDataset = cachedData.dataset || cachedData.public.assertion; - this.logger.info( - `Validating asset's public assertion with id: ${cachedAssertion} ual: ${ual}`, - ); - if (blockchainAssertionId !== cachedAssertion) { - await this.handleError( - operationId, - blockchain, - `Invalid assertion id for asset ${ual}. Received value from blockchain: ${blockchainAssertionId}, received value from request: ${cachedData.public.assertionId}`, - this.errorType, - true, - ); - return Command.empty(); - } // V0 backwards compatibility if (cachedData.private?.assertionId && cachedData.private?.assertion) { diff --git a/src/commands/protocols/get/sender/get-validate-asset-command.js b/src/commands/protocols/get/sender/get-validate-asset-command.js index 2da61a3de..0ec742cec 100644 --- a/src/commands/protocols/get/sender/get-validate-asset-command.js +++ b/src/commands/protocols/get/sender/get-validate-asset-command.js @@ -50,11 +50,7 @@ class GetValidateAssetCommand extends ValidateAssetCommand { ); // TODO: Update to validate knowledge asset index const isValidUal = isOperationV0 - ? await this.validationService.validateUalV6( - blockchain, - contract, - knowledgeCollectionId, - ) + ? true : await this.validationService.validateUal(blockchain, contract, knowledgeCollectionId); this.operationIdService.emitChangeEvent( OPERATION_ID_STATUS.GET.GET_VALIDATE_UAL_END,