From 812b660c0b9e772013432cb493a8ef844e093c4b Mon Sep 17 00:00:00 2001 From: Djordje Kovacevic Date: Fri, 12 Jan 2024 17:02:02 +0100 Subject: [PATCH 1/2] Fixed error type thrown on transaction error --- package-lock.json | 4 ++-- package.json | 2 +- src/commands/protocols/common/submit-commit-command.js | 2 +- src/commands/protocols/common/submit-proofs-command.js | 2 +- .../protocols/update/receiver/submit-update-commit-command.js | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8e19c69950..22def46834 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "origintrail_node", - "version": "6.1.3", + "version": "6.1.3+hotfix.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "origintrail_node", - "version": "6.1.3", + "version": "6.1.3+hotfix.1", "license": "ISC", "dependencies": { "@comunica/query-sparql": "^2.4.3", diff --git a/package.json b/package.json index a47456623b..8dcd03151d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "6.1.3", + "version": "6.1.3+hotfix.1", "description": "OTNode V6", "main": "index.js", "type": "module", diff --git a/src/commands/protocols/common/submit-commit-command.js b/src/commands/protocols/common/submit-commit-command.js index bc3e0d1fa3..d02e9b792d 100644 --- a/src/commands/protocols/common/submit-commit-command.js +++ b/src/commands/protocols/common/submit-commit-command.js @@ -131,7 +131,7 @@ class SubmitCommitCommand extends Command { `Retry number: ${COMMAND_RETRIES.SUBMIT_COMMIT - command.retries + 1}.`, ); this.operationIdService.emitChangeEvent( - OPERATION_ID_STATUS.COMMIT_PROOF.SUBMIT_COMMIT_SEND_TX_ERROR, + ERROR_TYPE.COMMIT_PROOF.SUBMIT_COMMIT_SEND_TX_ERROR, sendSubmitCommitTransactionOperationId, blockchain, error.message, diff --git a/src/commands/protocols/common/submit-proofs-command.js b/src/commands/protocols/common/submit-proofs-command.js index 93aba5dda2..f57028a617 100644 --- a/src/commands/protocols/common/submit-proofs-command.js +++ b/src/commands/protocols/common/submit-proofs-command.js @@ -181,7 +181,7 @@ class SubmitProofsCommand extends Command { `Retry number: ${COMMAND_RETRIES.SUBMIT_PROOFS - command.retries + 1}.`, ); this.operationIdService.emitChangeEvent( - OPERATION_ID_STATUS.COMMIT_PROOF.SUBMIT_COMMIT_SEND_TX_ERROR, + ERROR_TYPE.COMMIT_PROOF.SUBMIT_PROOFS_SEND_TX_ERROR, sendSubmitProofsTransactionOperationId, blockchain, error.message, diff --git a/src/commands/protocols/update/receiver/submit-update-commit-command.js b/src/commands/protocols/update/receiver/submit-update-commit-command.js index 4b2aa62ccd..97fd7dd87f 100644 --- a/src/commands/protocols/update/receiver/submit-update-commit-command.js +++ b/src/commands/protocols/update/receiver/submit-update-commit-command.js @@ -116,7 +116,7 @@ class SubmitUpdateCommitCommand extends Command { }.`, ); this.operationIdService.emitChangeEvent( - OPERATION_ID_STATUS.COMMIT_PROOF.SUBMIT_COMMIT_SEND_TX_ERROR, + ERROR_TYPE.COMMIT_PROOF.SUBMIT_UPDATE_COMMIT_SEND_TX_ERROR, sendSubmitUpdateCommitTransactionOperationId, blockchain, error.message, From 824b2ded25ff42fee1d384c8678c5edee6191346 Mon Sep 17 00:00:00 2001 From: Djordje Kovacevic Date: Fri, 12 Jan 2024 17:11:18 +0100 Subject: [PATCH 2/2] Updated error handling with correct event name --- src/commands/protocols/common/submit-commit-command.js | 2 +- src/commands/protocols/common/submit-proofs-command.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/protocols/common/submit-commit-command.js b/src/commands/protocols/common/submit-commit-command.js index d02e9b792d..61bdc85712 100644 --- a/src/commands/protocols/common/submit-commit-command.js +++ b/src/commands/protocols/common/submit-commit-command.js @@ -178,7 +178,7 @@ class SubmitCommitCommand extends Command { } else { msgBase = 'Node has already submitted commit. Finishing'; this.operationIdService.emitChangeEvent( - OPERATION_ID_STATUS.COMMIT_PROOF.SUBMIT_COMMIT_SEND_TX_ERROR, + ERROR_TYPE.COMMIT_PROOF.SUBMIT_COMMIT_SEND_TX_ERROR, sendSubmitCommitTransactionOperationId, blockchain, msgBase, diff --git a/src/commands/protocols/common/submit-proofs-command.js b/src/commands/protocols/common/submit-proofs-command.js index f57028a617..a6e30ae014 100644 --- a/src/commands/protocols/common/submit-proofs-command.js +++ b/src/commands/protocols/common/submit-proofs-command.js @@ -226,7 +226,7 @@ class SubmitProofsCommand extends Command { } else { msgBase = 'Node has already sent proof. Finishing'; this.operationIdService.emitChangeEvent( - OPERATION_ID_STATUS.COMMIT_PROOF.SUBMIT_COMMIT_SEND_TX_ERROR, + ERROR_TYPE.COMMIT_PROOF.SUBMIT_PROOFS_SEND_TX_ERROR, sendSubmitProofsTransactionOperationId, blockchain, msgBase,