Skip to content

Commit

Permalink
remove catch from get share request and remove dep on node index 1
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshu committed May 10, 2024
1 parent a43a46d commit 1892552
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helpers/nodeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export async function retrieveOrImportShare(params: {
return Promise.resolve(resultArr);
} else if (importedShares?.length === 0 && completedRequests.length >= ~~((endpoints.length * 3) / 4) + 1) {
const requiredNodeResult = completedRequests.find((resp: void | JRPCResponse<CommitmentRequestResult>) => {
if (resp && resp.result?.nodeindex === "1") {
if (resp) {
return true;
}
return false;
Expand Down Expand Up @@ -315,7 +315,7 @@ export async function retrieveOrImportShare(params: {
}),
null,
{ logTracingHeader: config.logRequestTracing }
).catch((err) => log.error("share req", err));
);
promiseArrRequest.push(p);
}
}
Expand Down

0 comments on commit 1892552

Please sign in to comment.