diff --git a/x/gamm/types/msg_swap.go b/x/gamm/types/msg_swap.go index d0107fec4c1..61e15b8241a 100644 --- a/x/gamm/types/msg_swap.go +++ b/x/gamm/types/msg_swap.go @@ -29,7 +29,8 @@ func (msg MsgSwapExactAmountIn) TokenInDenom() string { return msg.TokenIn.Denom } func (msg MsgSwapExactAmountIn) TokenOutDenom() string { - return msg.Routes[0].GetTokenOutDenom() + lastRouteIndex := len(msg.Routes) - 1 + return msg.Routes[lastRouteIndex].GetTokenOutDenom() } func (msg MsgSwapExactAmountIn) TokenDenomsOnPath() []string { denoms := make([]string, 0, len(msg.Routes)+1)