Skip to content

Commit

Permalink
fix: item creation
Browse files Browse the repository at this point in the history
  • Loading branch information
meelrossi committed Sep 26, 2023
1 parent c020ac1 commit b74acf3
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 20 deletions.
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"@babylonjs/core": "^4.2.0",
"@babylonjs/loaders": "^4.2.0",
"@dcl/builder-client": "^3.2.0",
"@dcl/builder-client": "^3.3.0",
"@dcl/content-hash-tree": "^1.1.3",
"@dcl/crypto": "^3.0.1",
"@dcl/hashing": "^3.0.4",
Expand Down Expand Up @@ -37,7 +37,7 @@
"decentraland-ecs": "^6.6.1-20201020183014.commit-bdc29ef-hotfix",
"decentraland-experiments": "^1.0.2",
"decentraland-transactions": "^1.47.0",
"decentraland-ui": "^4.15.0",
"decentraland-ui": "^4.19.0",
"ethers": "^5.6.8",
"file-saver": "^2.0.1",
"graphql": "^15.8.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,20 @@ export default class CreateSingleItemModal extends React.PureComponent<Props, St

createItem = async (sortedContents: SortedContent, representations: WearableRepresentation[]) => {
const { address, collection, isHandsCategoryEnabled } = this.props
const { id, name, description, type, metrics, collectionId, category, playMode, rarity, hasScreenshotTaken, requiredPermissions } = this
.state as StateData
const {
id,
name,
description,
type,
metrics,
collectionId,
category,
playMode,
rarity,
hasScreenshotTaken,
requiredPermissions,
tags
} = this.state as StateData

const belongsToAThirdPartyCollection = collection?.urn && isThirdParty(collection?.urn)
// If it's a third party item, we need to automatically create an URN for it by generating a random uuid different from the id
Expand Down Expand Up @@ -232,7 +244,7 @@ export default class CreateSingleItemModal extends React.PureComponent<Props, St
data = {
category: category as EmoteCategory,
loop: playMode === EmotePlayMode.LOOP,
tags: [],
tags: tags || [],
representations: [...representations]
} as EmoteDataADR74
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export type StateData = {
weareblePreviewUpdated: boolean
video?: string
requiredPermissions?: string[]
tags?: string[]
}
export type State = {
view: CreateItemView
Expand Down Expand Up @@ -96,6 +97,8 @@ export type AcceptedFileProps = Pick<
| 'hasScreenshotTaken'
| 'requiredPermissions'
| 'video'
| 'playMode'
| 'tags'
>
export type OwnProps = Pick<Props, 'metadata' | 'name' | 'onClose'>
export type MapStateProps = Pick<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ export default class ImportStep extends React.PureComponent<Props, State> {
name: emote.name,
description: emote.description,
rarity: emote.rarity,
category: emote.category
category: emote.category,
playMode: emote.play_mode,
tags: emote.tags
}
} else {
/** If the .zip file doesn't contain an asset.json file,
Expand Down

0 comments on commit b74acf3

Please sign in to comment.