diff --git a/src/commands/protocols/get/receiver/v1.0.0/v1-0-0-handle-get-request-command.js b/src/commands/protocols/get/receiver/v1.0.0/v1-0-0-handle-get-request-command.js index b01b1e377..3ee3337b4 100644 --- a/src/commands/protocols/get/receiver/v1.0.0/v1-0-0-handle-get-request-command.js +++ b/src/commands/protocols/get/receiver/v1.0.0/v1-0-0-handle-get-request-command.js @@ -38,6 +38,7 @@ class HandleGetRequestCommand extends HandleProtocolMessageCommand { ual, includeMetadata, assertionId, + isOperationV0, } = commandData; // if (paranetUAL) { @@ -109,17 +110,21 @@ class HandleGetRequestCommand extends HandleProtocolMessageCommand { let assertionPromise; - if (assertionId) { - assertionPromise = this.tripleStoreService - .getV6Assertion(TRIPLE_STORE_REPOSITORIES.PUBLIC_CURRENT, assertionId) - .then((result) => { - this.operationIdService.emitChangeEvent( - OPERATION_ID_STATUS.GET.GET_REMOTE_GET_ASSERTION_END, - operationId, - blockchain, - ); - return result; - }); + if (isOperationV0) { + if (!assertionId) { + // Find assertion id + } else { + assertionPromise = this.tripleStoreService + .getV6Assertion(TRIPLE_STORE_REPOSITORIES.PUBLIC_CURRENT, assertionId) + .then((result) => { + this.operationIdService.emitChangeEvent( + OPERATION_ID_STATUS.GET.GET_REMOTE_GET_ASSERTION_END, + operationId, + blockchain, + ); + return result; + }); + } } else { assertionPromise = this.tripleStoreService .getAssertion( diff --git a/src/commands/protocols/get/sender/get-find-shard-command.js b/src/commands/protocols/get/sender/get-find-shard-command.js index f3f0e5842..409f50452 100644 --- a/src/commands/protocols/get/sender/get-find-shard-command.js +++ b/src/commands/protocols/get/sender/get-find-shard-command.js @@ -22,7 +22,10 @@ class GetFindShardCommand extends FindShardCommand { getOperationCommandSequence(nodePartOfShard, commandData) { const sequence = []; if (nodePartOfShard) { - sequence.push('localGetCommand'); + // If operationV0 and no assertionId found go directly to networkGet + if (!commandData.isOperationV0 || commandData.assertionId) { + sequence.push('localGetCommand'); + } } sequence.push('networkGetCommand'); diff --git a/src/commands/protocols/get/sender/get-schedule-messages-command.js b/src/commands/protocols/get/sender/get-schedule-messages-command.js index d59bb6897..9ec9eb44b 100644 --- a/src/commands/protocols/get/sender/get-schedule-messages-command.js +++ b/src/commands/protocols/get/sender/get-schedule-messages-command.js @@ -26,6 +26,8 @@ class GetScheduleMessagesCommand extends ProtocolScheduleMessagesCommand { paranetUAL: command.data.paranetUAL, paranetId: command.data.paranetId, paranetMetadata: command.data.paranetMetadata, + assertionId: command.data.isOperationV0, + isOperationV0: command.data.assertionId, }; } diff --git a/src/commands/protocols/get/sender/v1.0.0/v1-0-0-get-request-command.js b/src/commands/protocols/get/sender/v1.0.0/v1-0-0-get-request-command.js index 786001ab3..84a727a52 100644 --- a/src/commands/protocols/get/sender/v1.0.0/v1-0-0-get-request-command.js +++ b/src/commands/protocols/get/sender/v1.0.0/v1-0-0-get-request-command.js @@ -47,6 +47,8 @@ class GetRequestCommand extends ProtocolRequestCommand { ual, paranetUAL, paranetId, + isOperationV0, + assertionId, } = command.data; return { @@ -58,6 +60,8 @@ class GetRequestCommand extends ProtocolRequestCommand { ual, paranetUAL, paranetId, + isOperationV0, + assertionId, }; } diff --git a/src/controllers/rpc/get-rpc-controller.js b/src/controllers/rpc/get-rpc-controller.js index 571d1511e..32b242b84 100644 --- a/src/controllers/rpc/get-rpc-controller.js +++ b/src/controllers/rpc/get-rpc-controller.js @@ -37,6 +37,8 @@ class GetController extends BaseController { state: message.data.state ?? DEFAULT_GET_STATE, paranetUAL: message.data.paranetUAL, paranetId: message.data.paranetId, + isOperationV0: message.data.isOperationV0, + assertionId: message.data.assertionId, }, transactional: false, });