Skip to content

Commit

Permalink
fix lint and gen mocks
Browse files Browse the repository at this point in the history
Signed-off-by: Shrenuj Bansal <[email protected]>
  • Loading branch information
shrenujb committed Mar 7, 2024
1 parent 7d63b0a commit 142696a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 5 deletions.
5 changes: 1 addition & 4 deletions protocol/app/upgrades/v5.0.0/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import (
func perpetualsUpgrade(
ctx sdk.Context,
perpetualsKeeper perptypes.PerpetualsKeeper,
) error {

) {
// Set all perpetuals to cross market type
perpetuals := perpetualsKeeper.GetAllPerpetuals(ctx)
for _, p := range perpetuals {
Expand All @@ -29,8 +28,6 @@ func perpetualsUpgrade(
panic(fmt.Sprintf("failed to set perpetual market type for perpetual %d: %s", p.GetId(), err))
}
}

return nil
}

func CreateUpgradeHandler(
Expand Down
40 changes: 40 additions & 0 deletions protocol/mocks/PerpetualsKeeper.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion protocol/x/perpetuals/keeper/perpetual.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ func (k Keeper) SetPerpetualMarketType(
perpetualId uint32,
marketType types.PerpetualMarketType,
) (types.Perpetual, error) {

if marketType == types.PerpetualMarketType_PERPETUAL_MARKET_TYPE_UNSPECIFIED {
return types.Perpetual{}, errorsmod.Wrap(
types.ErrInvalidMarketType,
Expand Down

0 comments on commit 142696a

Please sign in to comment.