-
Notifications
You must be signed in to change notification settings - Fork 33
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-752] Remove amount_out requirement in RequestOnchainFunds #1451
[ANCHOR-752] Remove amount_out requirement in RequestOnchainFunds #1451
Conversation
if (request.getAmountOut() == null && txn.getAmountOut() == null) { | ||
throw new InvalidParamsException("amount_out is required"); | ||
} |
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.
Shouldn't we require amount_out
when a quote was used or when amount_in_asset == amount_out_asset
?
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.
Good point. I think we should require amount_out if there was no quote as well
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 don't think we can require amount_out
if there was no quote, since the business doesn't have to commit to a payout amount until its about to send funds. The exception is if amount_out_asset = amount_in_asset
, since its always 1:1 minus fees.
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.
Sorry we should require either amount_out to be present either in request or in transaction
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 thanks @philipliu !
Description
amount_out
is not set if a transaction has an associated indicative quote but has not yet received funds.Context
N/A
Testing
./gradlew test
Documentation
N/A
Known limitations
N/A