Commit 4003aaed authored by ValarDragon's avatar ValarDragon
Browse files

Fix bug in swap_msg logic

parent 9a272d62
Showing with 2 additions and 1 deletion
+2 -1
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment