diff --git a/x/onft/keeper/denom.go b/x/onft/keeper/denom.go index a1682e0..2a663ca 100644 --- a/x/onft/keeper/denom.go +++ b/x/onft/keeper/denom.go @@ -218,9 +218,10 @@ func (k Keeper) HasPermissionToUpdateData(ctx sdk.Context, denomID string, sende return false } - if sender.String() == denom.Creator { + if denom.UpdatableData && sender.String() == denom.Creator { return true } + return false } diff --git a/x/onft/types/msgs.go b/x/onft/types/msgs.go index c77d17e..d9a3be8 100644 --- a/x/onft/types/msgs.go +++ b/x/onft/types/msgs.go @@ -358,12 +358,12 @@ func (m *MsgUpdateParams) ValidateBasic() error { return m.Params.ValidateBasic() } -func NewMsgUpdateONFTData(denomId, id, sender, data string) *MsgUpdateONFTData { +func NewMsgUpdateONFTData(denomId, id, data, sender string) *MsgUpdateONFTData { return &MsgUpdateONFTData{ Id: id, DenomId: denomId, - Sender: sender, Data: data, + Sender: sender, } }