Skip to content

Commit

Permalink
Fixed error message check
Browse files Browse the repository at this point in the history
  • Loading branch information
u-hubar committed Nov 3, 2023
1 parent faead07 commit 7bc8b18
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "origintrail_node",
"version": "6.0.18",
"version": "6.0.18+hotfix.1",
"description": "OTNode V6",
"main": "index.js",
"type": "module",
Expand Down
5 changes: 4 additions & 1 deletion src/commands/protocols/common/submit-commit-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ class SubmitCommitCommand extends Command {
epoch,
stateIndex,
(result) => {
if (result?.error && !result.error.includes('NodeAlreadySubmittedCommit')) {
if (
result?.error &&
!result.error.message.includes('NodeAlreadySubmittedCommit')
) {
reject(result.error);
}
resolve();
Expand Down
2 changes: 1 addition & 1 deletion src/commands/protocols/common/submit-proofs-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class SubmitProofsCommand extends Command {
leaf,
stateIndex,
(result) => {
if (result?.error && !result.error.includes('NodeAlreadyRewarded')) {
if (result?.error && !result.error.message.includes('NodeAlreadyRewarded')) {
reject(result.error);
}
resolve();
Expand Down

0 comments on commit 7bc8b18

Please sign in to comment.