Skip to content

Commit

Permalink
Fix bug in swap_msg logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ValarDragon committed Jan 11, 2022
1 parent 6328dd1 commit 3f7aeb5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/gamm/types/msg_swap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3f7aeb5

Please sign in to comment.