File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 "fmt"
55 "math"
66 "math/big"
7+ "strings"
78
89 "github.com/dydxprotocol/v4-chain/protocol/indexer/indexer_manager"
910 "github.com/dydxprotocol/v4-chain/protocol/lib/slinky"
@@ -43,6 +44,7 @@ func (k Keeper) CreateMarket(
4344 ctx sdk.Context ,
4445 ticker string ,
4546) (marketId uint32 , err error ) {
47+ ticker = strings .ToUpper (ticker )
4648 marketId = k .PricesKeeper .AcquireNextMarketID (ctx )
4749
4850 // Get market details from marketmap
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package keeper
22
33import (
44 "fmt"
5+ "strings"
56
67 gogotypes "github.com/cosmos/gogoproto/types"
78
@@ -41,7 +42,7 @@ func (k Keeper) CreateMarket(
4142 }
4243 // Stateful Validation
4344 for _ , market := range k .GetAllMarketParams (ctx ) {
44- if market .Pair == marketParam .Pair {
45+ if strings . EqualFold ( market .Pair , marketParam .Pair ) {
4546 return types.MarketParam {}, errorsmod .Wrap (
4647 types .ErrMarketParamPairAlreadyExists ,
4748 marketParam .Pair ,
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package keeper
22
33import (
44 "sort"
5+ "strings"
56
67 errorsmod "cosmossdk.io/errors"
78 "github.com/dydxprotocol/v4-chain/protocol/daemons/pricefeed/metrics"
@@ -41,7 +42,7 @@ func (k Keeper) ModifyMarketParam(
4142
4243 // Validate update is permitted.
4344 for _ , market := range k .GetAllMarketParams (ctx ) {
44- if market .Pair == updatedMarketParam .Pair && market .Id != updatedMarketParam .Id {
45+ if strings . EqualFold ( market .Pair , updatedMarketParam .Pair ) && market .Id != updatedMarketParam .Id {
4546 return types.MarketParam {}, errorsmod .Wrap (types .ErrMarketParamPairAlreadyExists , updatedMarketParam .Pair )
4647 }
4748 }
You can’t perform that action at this time.
0 commit comments