fix: remove addSlippageToMemo in favor of addLimitToMemo #7138
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.
Description
addSlippageToMemo
because the only thing it does is taking the slippage out of the limit and putting it back, the role of putting it in the memo should be limited toaddLimitToMemo
and this limit should be precalculatedgetLimitWithManualSlippage
then I finally usedaddLimitToMemo
Pull Request Type
Issue (if applicable)
partially #6777
Risk
High as it might add wrong behaviors to minAmountOut of THORChain memos
Testing
Memos and particularly minAmounOut part should be the same as before:
Tests those swaps and compare the minAmountOut values in the memos by adding console logs in
getL1quote
in every handlers:Engineering
n/a
Operations
n/a
Screenshots (if applicable)
Rune => BTC
Amount before: 34217, after slippage: 33874, seems good as it represent 1%ETH => COSMOS
Amount before: 464163000, after slippage: 459521370, seems good as it represent 1%
SHIB => BTC
Amount before: 45308, after slippage: 44854, seems good as it represent 1%