From 7236ba2c051db1480314514aeebfbe570e09407e Mon Sep 17 00:00:00 2001 From: Harish Marri Date: Sat, 9 Nov 2024 16:30:22 +0530 Subject: [PATCH] fix update onft data message --- x/onft/keeper/denom.go | 3 ++- x/onft/types/msgs.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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, } }