Skip to content

Commit

Permalink
fix: fixed a bug where a string within a transaction couldn't be pars…
Browse files Browse the repository at this point in the history
…ed (#249)
  • Loading branch information
Kammerlo authored Nov 4, 2024
1 parent b67e354 commit b4d8e28
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,8 @@ public String extractTransactionIfNeeded(String txWithExtraData) {
byte[] bytes = HexUtil.decodeHexString(txWithExtraData);
Array deserialize = (Array) CborSerializationUtil.deserialize(bytes);
// Unpack transaction if needed
if (deserialize.getDataItems().size() == 1) {
if (deserialize.getDataItems().size() == 1 && deserialize.getDataItems().getFirst().getMajorType()
.equals(MajorType.ARRAY)) {
deserialize = (Array) deserialize.getDataItems().getFirst();
}
if (deserialize.getDataItems().isEmpty()) {
Expand Down

0 comments on commit b4d8e28

Please sign in to comment.