Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
trinitys7 committed Nov 1, 2024
1 parent f4cb184 commit 7d48adc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
10 changes: 0 additions & 10 deletions x/asset/keeper/msg_server_authorize_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ func (ms msgServer) AuthorizeAddress(goCtx context.Context, msg *types.MsgAuthor
return nil, errorsmod.Wrapf(sdkerrors.ErrKeyNotFound, "symbol %s does not exists : %s", msg.Symbol, err.Error())
}

// Checks if the token manager signed
signers, _, err := ms.cdc.GetMsgV1Signers(msg)
if err != nil {
return nil, err
}

if len(signers) != 1 {
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "invalid signers")
}

// assert that the manager account is the only signer of the message
if msg.Manager != token.Manager {
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "caller not authorized")
Expand Down
10 changes: 0 additions & 10 deletions x/asset/keeper/msg_server_un_authorize_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ func (ms msgServer) UnAuthorizeAddress(goCtx context.Context, msg *types.MsgUnAu
return nil, errorsmod.Wrapf(sdkerrors.ErrKeyNotFound, "symbol %s does not exists: %s", msg.Symbol, err.Error())
}

// Checks if the token manager signed
signers, _, err := ms.cdc.GetMsgV1Signers(msg)
if err != nil {
return nil, err
}

if len(signers) != 1 {
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "invalid signers")
}

// assert that the manager account is the only signer of the message
if msg.Manager != token.Manager {
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "caller not authorized")
Expand Down

0 comments on commit 7d48adc

Please sign in to comment.