Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
aljo242 committed Sep 27, 2024
1 parent 69bed9f commit 846cd22
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion x/marketmap/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type Keeper struct {
// params is the module's parameters.
params collections.Item[types.Params]

// deleteValidationHooks are called by the keeper before any deletion call are performed.
// deleteValidationHooks are called by the keeper before any deletion call is performed.
deleteMarketValidationHooks types.MarketValidationHooks
}

Expand Down
10 changes: 7 additions & 3 deletions x/marketmap/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,12 @@ func (ms msgServer) RemoveMarketAuthorities(goCtx context.Context, msg *types.Ms
return &types.MsgRemoveMarketAuthoritiesResponse{}, nil
}

// RemoveMarkets attempts to remove all currently non-enabled markets from the market map.
func (ms msgServer) RemoveMarkets(goCtx context.Context, msg *types.MsgRemoveMarkets) (*types.MsgRemoveMarketsResponse,
error,
// RemoveMarkets attempts to remove the provided markets from the MarketMap. Stateful validation is performed on these
// markets using the configured ValidationHooks.
func (ms msgServer) RemoveMarkets(
goCtx context.Context,
msg *types.MsgRemoveMarkets) (
*types.MsgRemoveMarketsResponse, error,
) {
if msg == nil {
return nil, fmt.Errorf("unable to process nil msg")
Expand All @@ -277,6 +280,7 @@ func (ms msgServer) RemoveMarkets(goCtx context.Context, msg *types.MsgRemoveMar
}

if deleted {
ctx.Logger().Info(fmt.Sprintf("deleted market %s", market))
deletedMarkets = append(deletedMarkets, market)
}
}
Expand Down

0 comments on commit 846cd22

Please sign in to comment.