Skip to content

Commit 66ac8b4

Browse files
authored
Merge pull request #3 from KeystoneHQ/decode_tfcard
Catch ABI exception
2 parents ec55984 + bda3e10 commit 66ac8b4

File tree

1 file changed

+5
-1
lines changed
  • coinlib/src/main/java/com/keystone/coinlib/coins/ETH

1 file changed

+5
-1
lines changed

coinlib/src/main/java/com/keystone/coinlib/coins/ETH/EthImpl.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ public static JSONObject decodeRawTransaction(String txHex, Callback callback) {
143143
abi = readAsset("abi/Erc20.json");
144144
contractName = "Erc20";
145145
}
146-
decoder.addAbi(abi);
146+
try {
147+
decoder.addAbi(abi);
148+
} catch (RuntimeException e) {
149+
metaData.put("data", rawTx.getData());
150+
}
147151
AbiDecoder.DecodedMethod method = decoder.decodeMethod(rawTx.getData());
148152
if (method != null) {
149153
JSONObject data = method.toJson();

0 commit comments

Comments
 (0)