-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TransactionRecordQuery calls to capture failed transaction costs #593
Conversation
Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Codecov ReportBase: 71.39% // Head: 70.88% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #593 +/- ##
==========================================
- Coverage 71.39% 70.88% -0.51%
==========================================
Files 16 16
Lines 1115 1123 +8
Branches 192 194 +2
==========================================
Hits 796 796
- Misses 267 275 +8
Partials 52 52
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
let transactionFee: number | Hbar = 0; | ||
if (sdkClientError.isValidNetworkError()) { | ||
// pull transaction record for fee | ||
const transctionRecord = await new TransactionRecordQuery() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we should handle exceptions thrown by these calls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There shouldn't be exceptions since validateReceiptStatus
is false (which i need to update for the instance above).
I can wrap this in a try catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed
Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
…593) Add TransactionRecordQuery calls to capture fail transaction costs - update executeTransaction catch with TransactionRecordQuery logic - update executeGetTransactionRecord catch with TransactionRecordQuery logic Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
…(0.9) (#596) Cherry pick #593 Add TransactionRecordQuery calls to capture fail transaction costs - update executeTransaction catch with TransactionRecordQuery logic - update executeGetTransactionRecord catch with TransactionRecordQuery logic Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Signed-off-by: Nana Essilfie-Conduah nana@swirldslabs.com
Description:
Add TransactionRecordQuery calls to capture fail transaction costs
executeTransaction
catch withTransactionRecordQuery
logicexecuteGetTransactionRecord
catch withTransactionRecordQuery
logicRelated issue(s):
Fixes #592
Notes for reviewer:
Checklist