-
Notifications
You must be signed in to change notification settings - Fork 34
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
[ANCHOR-784] Remove 0 amounts from SEP-6 transaction responses #1469
base: develop
Are you sure you want to change the base?
[ANCHOR-784] Remove 0 amounts from SEP-6 transaction responses #1469
Conversation
expectedResponse.amountExpected = Amount(null, FIAT_USD) | ||
expectedResponse.amountIn = Amount("1", FIAT_USD) |
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.
This seems wrong, we default to the request asset code when the assets are not found in the transaction. https://github.com/stellar/java-stellar-anchor-sdk/blob/0834773d350c1eef61ffcf2cb71fe9eb17f7232f/core/src/main/java/org/stellar/anchor/util/TransactionHelper.java#L218
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.
I think it is possible that the transaction asset had not been written by RPC and we need to respond with the asset id.
Same logic exists at: https://github.com/stellar/java-stellar-anchor-sdk/blob/0834773d350c1eef61ffcf2cb71fe9eb17f7232f/core/src/main/java/org/stellar/anchor/util/TransactionHelper.java#L230
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.
LGTM
expectedResponse.amountExpected = Amount(null, FIAT_USD) | ||
expectedResponse.amountIn = Amount("1", FIAT_USD) |
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.
I think it is possible that the transaction asset had not been written by RPC and we need to respond with the asset id.
Same logic exists at: https://github.com/stellar/java-stellar-anchor-sdk/blob/0834773d350c1eef61ffcf2cb71fe9eb17f7232f/core/src/main/java/org/stellar/anchor/util/TransactionHelper.java#L230
Description
This removes the 0
amount_out
and 0amount_fee
placeholder values from the SEP-6 exchange transaction responses.Context
This was set as a placeholder because the request funds RPCs expected these fields always to be set.
Testing
./gradlew test
Documentation
N/A
Known limitations
N/A