-
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.
java-stellar-anchor-sdk/core/src/main/java/org/stellar/anchor/util/TransactionHelper.java
Line 218 in 0834773
AssetInfo info = service.getAsset(txn.getRequestAssetCode(), txn.getRequestAssetIssuer()); |
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:
java-stellar-anchor-sdk/core/src/main/java/org/stellar/anchor/util/TransactionHelper.java
Line 230 in 0834773
AssetInfo info = service.getAsset(txn.getRequestAssetCode(), txn.getRequestAssetIssuer()); |
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:
java-stellar-anchor-sdk/core/src/main/java/org/stellar/anchor/util/TransactionHelper.java
Line 230 in 0834773
AssetInfo info = service.getAsset(txn.getRequestAssetCode(), txn.getRequestAssetIssuer()); |
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