Skip to content

Commit

Permalink
Update constructor for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hwray committed Nov 22, 2024
1 parent 41d53b5 commit 249890e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion protocol/indexer/events/perpetual.go
Original file line number Diff line number Diff line change
@@ -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"
)

Expand All @@ -20,6 +21,6 @@ func NewUpdatePerpetualEvent(
MarketId: marketId,
AtomicResolution: atomicResolution,
LiquidityTier: liquidityTier,
MarketType: marketType,
MarketType: v1.ConvertToPerpetualMarketType(marketType),
}
}
3 changes: 2 additions & 1 deletion protocol/indexer/events/perpetual_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
}

0 comments on commit 249890e

Please sign in to comment.