diff --git a/cmd/omniflixhubd/cmd/root.go b/cmd/omniflixhubd/cmd/root.go index e325bb89..603dba9c 100644 --- a/cmd/omniflixhubd/cmd/root.go +++ b/cmd/omniflixhubd/cmd/root.go @@ -22,7 +22,6 @@ import ( "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" - sdk "github.com/cosmos/cosmos-sdk/types" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/x/auth/types" vestingcli "github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli" @@ -94,9 +93,6 @@ func initTendermintConfig() *tmcfg.Config { } func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { - cfg := sdk.GetConfig() - cfg.Seal() - ac := appCreator{encodingConfig} rootCmd.AddCommand( diff --git a/x/onft/types/builder.go b/x/onft/types/builder.go index 3e5de0ee..e2e0d762 100644 --- a/x/onft/types/builder.go +++ b/x/onft/types/builder.go @@ -33,7 +33,6 @@ var ( nftKeyPreviewURI = fmt.Sprintf("%s%s", Namespace, "preview_uri") nftKeyDescription = fmt.Sprintf("%s%s", Namespace, "description") nftKeyCreatedAt = fmt.Sprintf("%s%s", Namespace, "created_at") - nftKeyTransferable = fmt.Sprintf("%s%s", Namespace, "transferable") nftKeyExtensible = fmt.Sprintf("%s%s", Namespace, "extensible") nftKeyNSFW = fmt.Sprintf("%s%s", Namespace, "nsfw") nftKeyRoyaltyShare = fmt.Sprintf("%s%s", Namespace, "royalty_share") @@ -275,7 +274,6 @@ func (nb NFTBuilder) BuildMetadata(_nft nft.NFT) (string, error) { kvals[nftKeyName] = MediaField{Value: nftMetadata.Name} kvals[nftKeyDescription] = MediaField{Value: nftMetadata.Description} kvals[nftKeyPreviewURI] = MediaField{Value: nftMetadata.PreviewURI} - kvals[nftKeyTransferable] = MediaField{Value: nftMetadata.Transferable} kvals[nftKeyExtensible] = MediaField{Value: nftMetadata.Extensible} kvals[nftKeyNSFW] = MediaField{Value: nftMetadata.Nsfw} kvals[nftKeyCreatedAt] = MediaField{Value: nftMetadata.CreatedAt} @@ -319,6 +317,7 @@ func (nb NFTBuilder) Build(classId, nftID, nftURI, nftData string) (nft.NFT, err description string previewURI string nsfw = false + extensible = true createdAt string royaltyShare string uriHash string @@ -367,6 +366,24 @@ func (nb NFTBuilder) Build(classId, nftID, nftURI, nftData string) (nft.NFT, err } } + if v, ok := dataMap[nftKeyExtensible]; ok { + if vMap, ok := v.(map[string]interface{}); ok { + if vBool, ok := vMap[KeyMediaFieldValue].(bool); ok { + extensible = vBool + delete(dataMap, nftKeyExtensible) + } + } + } + + if v, ok := dataMap[nftKeyNSFW]; ok { + if vMap, ok := v.(map[string]interface{}); ok { + if vBool, ok := vMap[KeyMediaFieldValue].(bool); ok { + nsfw = vBool + delete(dataMap, nftKeyNSFW) + } + } + } + if v, ok := dataMap[nftKeyNSFW]; ok { if vMap, ok := v.(map[string]interface{}); ok { if vBool, ok := vMap[KeyMediaFieldValue].(bool); ok { @@ -402,7 +419,7 @@ func (nb NFTBuilder) Build(classId, nftID, nftURI, nftData string) (nft.NFT, err PreviewURI: previewURI, Data: data, Transferable: true, - Extensible: true, + Extensible: extensible, Nsfw: nsfw, CreatedAt: createdTime, RoyaltyShare: royalty,