-
Notifications
You must be signed in to change notification settings - Fork 159
feat!: add events field to GetTransactionsResponse.Transaction an…
#706
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
Conversation
…d `GetTransactionResponse`
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## add-protocol23-support #706 +/- ##
=========================================================
Coverage ? 80.41%
Complexity ? 1269
=========================================================
Files ? 214
Lines ? 5030
Branches ? 421
=========================================================
Hits ? 4045
Misses ? 724
Partials ? 261
🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR enhances transaction response models by introducing a structured events field and updating JSON fixtures and deserializers to cover diagnostic, transaction, and contract events.
- Added
eventsobject to JSON test fixtures for both bulk and single-transaction responses. - Introduced a new
Eventsclass with XDR parsing helpers and wired it intoGetTransactionsResponse.TransactionandGetTransactionResponse. - Updated unit tests to assert presence and parsing of the new
eventsdata.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/resources/responses/sorobanrpc/get_transactions.json | Added events block to each transaction entry |
| src/test/resources/responses/sorobanrpc/get_transaction_success.json | Added events block to the single-transaction response |
| src/main/java/org/stellar/sdk/responses/sorobanrpc/Events.java | New Events value class with parsing methods |
| src/main/java/org/stellar/sdk/responses/sorobanrpc/GetTransactionsResponse.java | Deprecated old field and added new events field in Transaction |
| src/main/java/org/stellar/sdk/responses/sorobanrpc/GetTransactionResponse.java | Added new events field to the response model |
| src/test/java/org/stellar/sdk/responses/sorobanrpc/GetTransactionsDeserializerTest.java | Extended test to cover events parsing |
| src/test/java/org/stellar/sdk/responses/sorobanrpc/GetTransactionDeserializerTest.java | Added null check for the new events field |
| CHANGELOG.md | Documented the addition of events field and related deprecations |
Comments suppressed due to low confidence (2)
src/test/java/org/stellar/sdk/responses/sorobanrpc/GetTransactionDeserializerTest.java:58
- Extend this test to also verify that each sub-list (diagnostic, transaction, contract events) has the expected size and that their parsed XDR matches the raw Base64 strings, similar to the multi-transaction test.
assertNotNull(getTransactionResponse.getResult().getEvents());
src/main/java/org/stellar/sdk/responses/sorobanrpc/GetTransactionResponse.java:46
- Add a Javadoc comment describing the new
eventsfield and its role, mirroring the deprecation notice style used fordiagnosticEventsXdrin the bulk response.
Events events;
…d
GetTransactionResponse