Skip to content

Commit

Permalink
Merge pull request #3 from KeystoneHQ/decode_tfcard
Browse files Browse the repository at this point in the history
Catch ABI exception
  • Loading branch information
caixiao-QA authored Jul 14, 2021
2 parents ec55984 + bda3e10 commit 66ac8b4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ public static JSONObject decodeRawTransaction(String txHex, Callback callback) {
abi = readAsset("abi/Erc20.json");
contractName = "Erc20";
}
decoder.addAbi(abi);
try {
decoder.addAbi(abi);
} catch (RuntimeException e) {
metaData.put("data", rawTx.getData());
}
AbiDecoder.DecodedMethod method = decoder.decodeMethod(rawTx.getData());
if (method != null) {
JSONObject data = method.toJson();
Expand Down

0 comments on commit 66ac8b4

Please sign in to comment.