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

AMM SDK Updates #359

Merged
merged 21 commits into from
Sep 21, 2021
Merged

AMM SDK Updates #359

merged 21 commits into from
Sep 21, 2021

Conversation

paulbellamy
Copy link
Contributor

@paulbellamy paulbellamy commented Sep 17, 2021

Fixes #357

This adds the new functionality and updates for AMMs, into the java sdk.

I'm definitely not a Java expert, so feedback here would be great.

Stuff I'm not sure about:

  • Optional.absent vs null for missing fields. In other fields we've used null, but Optional.absent seems cleaner? Not sure what the convention is here.
  • Should we uppercase all Id instances to ID?
  • Should we have a hashCode on everything?
  • Should we have a toString on everything?
  • Should ChangeTrustAsset and TrustLineAsset be sortable?

@@ -32,6 +32,13 @@ public static Asset create(String type, String code, String issuer) {
}
}

public static Asset create(ChangeTrustAsset.Wrapper wrapped) {
Copy link
Contributor

@tamirms tamirms Sep 17, 2021

Choose a reason for hiding this comment

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

I'm not sure if these methods are useful because calling wrapped.getAsset() is just as easy as calling Asset.create(wrapped)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, my thinking was that the conversions would be more symmetric this way. e.g. ChangeTrustAsset.create(native), or Asset.create(changeTrustAsset)

@paulbellamy paulbellamy merged commit 02998dc into master Sep 21, 2021
* @see org.stellar.sdk.Server#effects()
*/
public class LiquidityPoolTradeEffectResponse extends EffectResponse {
@SerializedName("liquidity_pool")

Choose a reason for hiding this comment

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

Shouldn't this be "liquidity_pool_id" ?

Copy link
Contributor

Choose a reason for hiding this comment

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

@Kirbyrawr the field should be liquidity_pool but the type of the field is wrong. the fix is here #363

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.

Liquidity Pools Java SDK Update
3 participants