Merged
Conversation
TransactionResponse classTransactionResponse class
There was a problem hiding this comment.
Pull request overview
This PR refactors the TransactionResponse class to introduce breaking changes that improve type safety and consistency with the Stellar Horizon API. The changes address issues #91 and #92 by adding required modifiers to always-present properties, changing type representations to match API contracts, and reorganizing the class structure.
Key Changes
- Added
requiredmodifiers to non-nullable properties to enforce compile-time initialization requirements - Changed numeric fee/muxed ID properties to strings to match Horizon API representation
- Extracted nested classes (
TransactionResponseLinks,TransactionResponsePreconditions) into separate files for better organization - Updated test data to use current Horizon API responses and improved test coverage
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
StellarDotnetSdk/Responses/TransactionResponse.cs |
Added required modifiers, changed fee/muxed properties to strings, improved documentation, extracted nested classes |
StellarDotnetSdk/Responses/TransactionResponseLinks.cs |
New file containing extracted TransactionResponseLinks class with required modifiers |
StellarDotnetSdk/Responses/TransactionResponsePreconditions.cs |
New file containing preconditions-related classes with proper nullability |
StellarDotnetSdk.Tests/Responses/TransactionDeserializerTest.cs |
Updated tests to use current test data and validate new property types |
StellarDotnetSdk.Tests/TestData/Responses/*.json |
Replaced outdated test data with current Horizon API responses |
Comments suppressed due to low confidence (1)
StellarDotnetSdk.Tests/Responses/TransactionDeserializerTest.cs:1
- The test now validates
CreatedAtas a string but doesn't verify that the string can be successfully parsed as a valid DateTime. Consider adding validation that the ISO 8601 format can be parsed usingDateTime.Parse(transaction.CreatedAt)to ensure the string format is correct.
using System.IO;
Contributor
|
bugbot run |
jopmiddelkamp
requested changes
Dec 3, 2025
jopmiddelkamp
requested changes
Dec 4, 2025
9516ddc to
d619166
Compare
jopmiddelkamp
requested changes
Dec 8, 2025
73d7861 to
8f6ed31
Compare
jopmiddelkamp
previously approved these changes
Dec 8, 2025
0491a17 to
7f62ba6
Compare
7f62ba6 to
6c1bfe7
Compare
6c1bfe7 to
a08ea96
Compare
jopmiddelkamp
approved these changes
Dec 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Types of changes
TransactionResponse.Preconditions#91TransactionResponseclass #92requiredmodifier to always-present propertiesNote
Refactors
TransactionResponse(breaking) to match Horizon: adds required fields, changes several types/fields, introduces preconditions/links, and updates tests/fixtures accordingly.TransactionResponse:sealed; add required fields (id,links, etc.).created_atto ISO string;fee_charged/max_feeto string; muxed IDs to string.fee_meta_xdr,preconditions; removeresult_meta_xdr.InnerTransaction.max_feeto string; stricter memo handling (invalid ops throwInvalidOperationException).TransactionResponseLinks(addstransactionlink;precedes/succeedsnow pages).TransactionResponsePreconditionswithTimeBoundsand optional bounds/signers.transaction.json; addtransactionWithTextMemo.json; update muxed/fee-bump fixtures (string fees, new links).CreatedAtstring,FeeMetaXdr, memo handling).Written by Cursor Bugbot for commit 0a8ab05. Configure here.