Skip to content

Commit

Permalink
feat: if dataType cannot be found and also is not VirtualTransactionC…
Browse files Browse the repository at this point in the history
…reated
  • Loading branch information
AbigailDeng authored and AbigailDeng committed May 9, 2024
1 parent 269d5e8 commit 6a62607
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

| Statements | Branches | Functions | Lines |
| --------------------------- | ----------------------- | ------------------------- | ----------------- |
| ![Statements](https://img.shields.io/badge/statements-96.82%25-brightgreen.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-93.69%25-brightgreen.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-96.72%25-brightgreen.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-97.01%25-brightgreen.svg?style=flat) |
| ![Statements](https://img.shields.io/badge/statements-96.72%25-brightgreen.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-93.49%25-brightgreen.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-96.72%25-brightgreen.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-96.91%25-brightgreen.svg?style=flat) |


## 1. Introduction
Expand Down
6 changes: 6 additions & 0 deletions src/util/proto.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@ const handleLogs = (logs = [], services, Root) => {
return getDeserializeLogResult(serializedData, dataType);
}
} else {
// if dataType cannot be found and also is not VirtualTransactionCreated
if (!dataType) {
return {
message: 'This log is not supported.',
};
}
// other method
return getDeserializeLogResult(serializedData, dataType);
}
Expand Down

0 comments on commit 6a62607

Please sign in to comment.