Skip to content

Commit

Permalink
ticket-885 error check added for skale_imaVerifyAndSign call result
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiy-skalelabs committed Nov 14, 2023
1 parent 2dca856 commit 0d8c958
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion agent/bls.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ async function doSignProcessHandleCall(
cc.attention( optsSignOperation.sequenceId ) + "\n" );
}
if( ( !joOut ) || typeof joOut != "object" || ( !( "result" in joOut ) ) || ( !joOut.result ) ||
typeof joOut.result != "object" ) {
typeof joOut.result != "object" || "error" in joOut || joOut.error ) {
++optsSignOperation.joGatheringTracker.nCountErrors;
const strErrorMessage = optsSignOperation.strLogPrefix +
cc.fatal( "Wallet CRITICAL ERROR:" ) + " " +
Expand Down Expand Up @@ -2065,6 +2065,7 @@ async function doSignU256OneImpl( i, optsSignU256 ) {
cc.j( joOut ) + "\n" );
}
if( ( !joOut ) || typeof joOut != "object" || ( !( "result" in joOut ) ) ||
"error" in joOut || joOut.error ||
( !joOut.result ) || typeof joOut.result != "object" ||
( !( "signature" in joOut.result ) ) || joOut.result.signature != "object"
) {
Expand Down

0 comments on commit 0d8c958

Please sign in to comment.