fix: routing-api still honor portion amount from URA for exact out #390
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
bug is we removed the portionAmount for exact out https://github.com/Uniswap/routing-api/pull/387/files#diff-dc59a746b92820090d0a892e1c87af0233d56b63105153041d3af30705b3c9afL273-R279 But URA still passes down portionAmount for exact out in https://github.com/Uniswap/unified-routing-api/blob/main/lib/providers/quoters/RoutingApiQuoter.ts#L190-L197.
There's a URA clean-up PR that removes URA from sending down the
portionAmount
at all https://github.com/Uniswap/unified-routing-api/pull/282/files#diff-629f71c698e1f122086df5a5ef4ef75d8b58a8759f3f2e897a2ab6ffe52b1322L194-R125. But it's not ready to get merged. In order to unblock e2e testing, routing-api needs to honorportionAmount
from URA if it exists. If not, then honorportionBps
and computeportionAmount
. This logic is needed, because routing-api integ-test doesn't sendportionAmont
even for exact out.We will want to revert this PR, once Uniswap/unified-routing-api#282 gets merged.