Skip to content

Commit

Permalink
Merge PR: fix x/dex list same token as product (#138)
Browse files Browse the repository at this point in the history
Co-authored-by: fpchen <fpchen>
  • Loading branch information
fpChan authored May 15, 2020
1 parent d976116 commit e2f6fb1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions x/dex/types/msgs.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package types

import (
"fmt"

"github.com/cosmos/cosmos-sdk/x/auth"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -38,6 +40,9 @@ func (msg MsgList) Type() string { return "list" }

// ValidateBasic Implements Msg
func (msg MsgList) ValidateBasic() sdk.Error {
if msg.ListAsset == msg.QuoteAsset {
return sdk.ErrInvalidCoins(fmt.Sprintf("failed to list product because base asset is same as quote asset"))
}
return nil
}

Expand Down

0 comments on commit e2f6fb1

Please sign in to comment.