Skip to content

In the SwapByDenom function, the tx cannot be executed due to the msg.MaxAmount.Denom validation logic error #1336

@icehawk-hyb

Description

@icehawk-hyb

1.description:
In the MsgSwapByDenom transaction, FlagMaxAmount represents the TokenIn asset。
However, in the SwapByDenom function, msg.MaxAmount.Denom is verified against msg.DenomOut assets, causing the transaction to fail.

2.code:

Image

Image

3.suggestion:

msg.MaxAmount.Denom != msg.DenomIn

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions