-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix(txfees, gamm): remove taker fee swap event from trade events #87
base: main-dym
Are you sure you want to change the base?
Conversation
@@ -17,57 +15,17 @@ func (k Keeper) chargeTakerFee( | |||
ctx sdk.Context, | |||
takerFeeCoin sdk.Coin, | |||
sender sdk.AccAddress, | |||
route poolmanagertypes.SwapAmountInRoute, |
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.
chargeTakerFee
used to swap if it's unknown denom.
as we don't expect pools with non-dym, we don't need this logic.
And if we would like it in the future, it needs to be part of the x/txfees
logic anyway
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 it's correct we don't expect pools with non-dym.
we may have usdc pools.
@@ -128,44 +131,44 @@ func ValueFromPtr[T any](ptr *T) (zero T) { | |||
} | |||
|
|||
// swapFeeToBaseDenom swaps the taker fee coin to the base denom. | |||
// If the fee token is unknown, it is sent to the community pool. | |||
// Returns error if the fee token is unknown or if swapping fails. | |||
// The fee must be sent to the txfees module account beforehand. | |||
func (k Keeper) swapFeeToBaseDenom( |
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.
swapFeeToBaseDenom
was cleaned of the communityPool
logic.
now handled by caller, based on returned err
x/gamm
x/txfees
swapFeeToBaseDenom
from community pool logick.poolManager.RouteExactAmountIn
with cacheCtx to drop the internal events