Skip to content
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

Include new Protocol 19 Preconditions on Transaction API resource #428

Merged
merged 2 commits into from
May 4, 2022

Conversation

sreuland
Copy link
Contributor

@sreuland sreuland commented May 4, 2022

Update the Transaction API Response model to include new P19 Preconditions, this also supports the latest changes in Horizon API to Preconditions json model of datetime attribs being expressed in unix epoch.

@sreuland sreuland requested review from tamirms and Shaptic May 4, 2022 04:12
Comment on lines 183 to 184
@SerializedName("min_account_sequence")
long minAccountSequence;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a distinction between when minAccountSequence is set or not, so you can't treat not set to a default value like 0. Not set means one-less than the tx seq, but 0 means 0. @Shaptic This may be an issue in Horizon's API and in other SDKs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, ok, thanks for mentioning this, I updated the sdk here to model that as a nullable object to signal if wasn't present in the json.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a pointer in the API, so we're good

Copy link
Contributor

@Shaptic Shaptic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Does the account response resource also have the new sequence_ledger/time fields?

@sreuland
Copy link
Contributor Author

sreuland commented May 4, 2022

Cool! Does the account response resource also have the new sequence_ledger/time fields?

Yes, those have been added as nullable:
https://github.com/stellar/java-stellar-sdk/blob/master/src/main/java/org/stellar/sdk/responses/AccountResponse.java#L28-L31

@sreuland sreuland merged commit c5c9bbd into lightsail-network:master May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants