Skip to content

Commit

Permalink
op action returnData decode fail case (Conflux-Chain#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pana authored Mar 28, 2023
1 parent 7a6f72d commit b5de9aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "js-conflux-sdk",
"description": "JavaScript Conflux Software Development Kit",
"version": "2.1.9",
"version": "2.1.10",
"license": "LGPL-3.0",
"author": "[email protected]",
"repository": "https://github.com/Conflux-Chain/js-conflux-sdk.git",
Expand Down
2 changes: 1 addition & 1 deletion src/util/trace.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function _decodeErrorMessage(action) {
let errorMessage;
if (action.outcome === CALL_STATUS.REVERTED && action.returnData !== '0x') {
const decoded = errorContract.abi.decodeData(action.returnData);
errorMessage = decoded.object.message;
errorMessage = decoded?.object?.message;
}
if (action.outcome === CALL_STATUS.FAIL) {
errorMessage = decodeHexEncodedStr(action.returnData);
Expand Down

0 comments on commit b5de9aa

Please sign in to comment.