Skip to content

Commit

Permalink
Add mising await
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihajlo-Pavlovic committed Dec 11, 2024
1 parent a103f3b commit e431c10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
5 changes: 3 additions & 2 deletions src/commands/local-store/local-store-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class LocalStoreCommand extends Command {
);

if (storeType === LOCAL_STORE_TYPES.TRIPLE) {
const storePromises = [];
// const storePromises = [];

// if (cachedData.dataset && cachedData.datasetRoot) {
// storePromises.push(
Expand All @@ -71,7 +71,7 @@ class LocalStoreCommand extends Command {
// this.pendingStorageService.cacheDataset(operationId, datasetRoot, dataset),
// );
// }
await Promise.all(storePromises);
// await Promise.all(storePromises);

const identityId = await this.blockchainModuleManager.getIdentityId(blockchain);
const signature = await this.blsService.sign(datasetRoot);
Expand All @@ -81,6 +81,7 @@ class LocalStoreCommand extends Command {
operationId,
blockchain,
);

await this.operationService.processResponse(
command,
OPERATION_REQUEST_STATUS.COMPLETED,
Expand Down
14 changes: 3 additions & 11 deletions src/commands/protocols/common/protocol-request-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,12 @@ class ProtocolRequestCommand extends ProtocolMessageCommand {

async execute(command) {
const { operationId, blockchain } = command.data;
await this.operationIdService.emitChangeEvent(
this.operationStartEvent,
operationId,
blockchain,
);
const result = this.executeProtocolMessageCommand(
this.operationIdService.emitChangeEvent(this.operationStartEvent, operationId, blockchain);
const result = await this.executeProtocolMessageCommand(
command,
NETWORK_MESSAGE_TYPES.REQUESTS.PROTOCOL_REQUEST,
);
await this.operationIdService.emitChangeEvent(
this.operationEndEvent,
operationId,
blockchain,
);
this.operationIdService.emitChangeEvent(this.operationEndEvent, operationId, blockchain);

return result;
}
Expand Down

0 comments on commit e431c10

Please sign in to comment.