Skip to content

Commit

Permalink
make council available but optional
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickwieth committed Oct 3, 2022
1 parent 4e2c35d commit 64d870f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions x/cardchain/keeper/msg_server_create_council.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ func (k msgServer) CreateCouncil(goCtx context.Context, msg *types.MsgCreateCoun
}

card := k.Cards.Get(ctx, msg.CardId)
if card.Status != types.Status_prototype {
return nil, sdkerrors.Wrapf(types.ErrInvalidCardStatus, "%s", card.Status.String())
} else if card.Owner != msg.Creator {
//if card.Status != types.Status_prototype {
// return nil, sdkerrors.Wrapf(types.ErrInvalidCardStatus, "%s", card.Status.String())
//} else
if card.Owner != msg.Creator {
return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Incorrect Creator")
}

Expand Down

0 comments on commit 64d870f

Please sign in to comment.