diff --git a/src/service/get-service.js b/src/service/get-service.js index acbb54537b..362e1b1af5 100644 --- a/src/service/get-service.js +++ b/src/service/get-service.js @@ -46,7 +46,7 @@ class GetService extends OperationService { paranetId, paranetRepoId, paranetLatestAsset, - paranetDeleteFromEarlier + paranetDeleteFromEarlier, } = command.data; const keywordsStatuses = await this.getResponsesStatuses( @@ -104,12 +104,14 @@ class GetService extends OperationService { if (paranetSync) { this.logger.debug( - `PARACHAIN_ASSET_SYNC: ${responseData.nquads.length} nquads found for asset with ual: ${ual}, state index: ${stateIndex}, assertionId: ${assertionId}`, + `PARANET_ASSET_SYNC: ${responseData.nquads.length} nquads found for asset with ual: ${ual}, state index: ${stateIndex}, assertionId: ${assertionId}`, ); if (paranetLatestAsset) { await this.tripleStoreService.localStoreAsset( - `${this.paranetIdService.getParanetRepositoryName(paranetId)}-${TRIPLE_STORE_REPOSITORIES.PUBLIC_CURRENT}`, + `${this.paranetIdService.getParanetRepositoryName(paranetId)}-${ + TRIPLE_STORE_REPOSITORIES.PUBLIC_CURRENT + }`, assertionId, responseData.nquads, blockchain, @@ -117,16 +119,17 @@ class GetService extends OperationService { tokenId, keyword, ); - } - else if (paranetRepoId) { - const newRepoName = `${this.paranetIdService.getParanetRepositoryName(paranetId)}-${paranetRepoId}`; + } else if (paranetRepoId) { + const newRepoName = `${this.paranetIdService.getParanetRepositoryName( + paranetId, + )}-${paranetRepoId}`; if (paranetDeleteFromEarlier) { // This was the previous latest one, move it to currentHistory this.logger.debug( - `PARACHAIN_ASSET_SYNC: Moving asset to repo ${newRepoName}, with ual: ${ual}, state index: ${stateIndex}, assertionId: ${assertionId}`, - ); - + `PARANET_ASSET_SYNC: Moving asset to repo ${newRepoName}, with ual: ${ual}, state index: ${stateIndex}, assertionId: ${assertionId}`, + ); + await this.tripleStoreService.moveAsset( newRepoName, assertionId, @@ -135,13 +138,12 @@ class GetService extends OperationService { tokenId, keyword, ); - } - else { + } else { // This is one of the older assets, just update it this.logger.debug( - `PARACHAIN_ASSET_SYNC: Updating asset in repo ${newRepoName}, with ual: ${ual}, state index: ${stateIndex}, assertionId: ${assertionId}`, - ); + `PARANET_ASSET_SYNC: Updating asset in repo ${newRepoName}, with ual: ${ual}, state index: ${stateIndex}, assertionId: ${assertionId}`, + ); await this.tripleStoreService.localStoreAsset( newRepoName,