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

#375: Fix missing Liquidity Pool ID in AccountResponse Balance #379

Merged
merged 3 commits into from
Nov 15, 2021

Conversation

sreuland
Copy link
Contributor

Problem: After account retrieval from server for an account which had liquidity pool balances, the result instance of AccountResponse has a Balance instance for liquidity pool shares, however it was not populating the Balance:liquidityPoolId attribute, attempt to get the PoolId via Balance.getLiquidityPoolId() incorrectly returned an absence(empty Java Optional instance).

Fix: changed serialization to correctly map the server json response attribute for the optional LiquidityPoolId if present, into the Balance:liquidityPoolId object instance.

Closes #375

@sreuland sreuland added the bug label Nov 12, 2021
@sreuland sreuland self-assigned this Nov 12, 2021
@sreuland sreuland requested a review from tamirms November 12, 2021 21:33
CHANGELOG.md Outdated
@@ -2,6 +2,10 @@

As this project is pre 1.0, breaking changes may happen for minor version bumps. A breaking change will get clearly notified in this log.

## Unreleased

* Fixed bug, absence of Liquidity Pool ID in AccountResponse Balance ([#379](https://github.com/stellar/java-stellar-sdk/pull/379)).
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I would phrase it as "Fixed missing Liquidity Pool ID in AccountResponse Balance"

@sreuland sreuland changed the title #375: Fixed bug, absence of Liquidity Pool ID in AccountResponse Balance #375: Fix missing Liquidity Pool ID in AccountResponse Balance Nov 15, 2021
@sreuland sreuland merged commit e1b73c1 into master Nov 15, 2021
@sreuland sreuland deleted the 375_account_balance_liquidityid_fix branch November 15, 2021 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Analysis of LIQUIDITY_POOL_SHARES type assets in AccountResponse.balance cannot obtain LiquidityPoolID
2 participants