diff --git a/protocol/indexer/events/perpetual.go b/protocol/indexer/events/perpetual.go index 08ea2fa82b..c6a5db40a2 100644 --- a/protocol/indexer/events/perpetual.go +++ b/protocol/indexer/events/perpetual.go @@ -1,6 +1,7 @@ package events import ( + v1 "github.com/dydxprotocol/v4-chain/protocol/indexer/protocol/v1" perptypes "github.com/dydxprotocol/v4-chain/protocol/x/perpetuals/types" ) @@ -20,6 +21,6 @@ func NewUpdatePerpetualEvent( MarketId: marketId, AtomicResolution: atomicResolution, LiquidityTier: liquidityTier, - MarketType: marketType, + MarketType: v1.ConvertToPerpetualMarketType(marketType), } } diff --git a/protocol/indexer/events/perpetual_test.go b/protocol/indexer/events/perpetual_test.go index 713a0209dc..2c9a7cb300 100644 --- a/protocol/indexer/events/perpetual_test.go +++ b/protocol/indexer/events/perpetual_test.go @@ -3,6 +3,7 @@ package events import ( "testing" + v1types "github.com/dydxprotocol/v4-chain/protocol/indexer/protocol/v1/types" perptypes "github.com/dydxprotocol/v4-chain/protocol/x/perpetuals/types" "github.com/stretchr/testify/require" @@ -23,7 +24,7 @@ func TestNewUpdatePerpetualEvent_Success(t *testing.T) { MarketId: 5, AtomicResolution: -8, LiquidityTier: 2, - MarketType: perptypes.PerpetualMarketType_PERPETUAL_MARKET_TYPE_CROSS, + MarketType: v1types.PerpetualMarketType_PERPETUAL_MARKET_TYPE_CROSS, } require.Equal(t, expectedUpdatePerpetualEventProto, updatePerpetualEvent) }