Skip to content

Commit

Permalink
feat: Add matic amoy support (#3078)
Browse files Browse the repository at this point in the history
* feat: Add matic amoy to the protocol matcher

* chore: Update packages

* fix: Styles

* fix: emote size condition

* chore: Upgrade @dcl/schemas

* feat: Update decentraland-transactions package

* fix: package-lock

* fix: package version

* chore: Upgrade .nvmrc to node 20 lts
  • Loading branch information
cyaiox authored Apr 18, 2024
1 parent 8d33826 commit 334ed3e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.18.2
v20.10.0
30 changes: 15 additions & 15 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@dcl/crypto": "^3.4.5",
"@dcl/hashing": "^3.0.4",
"@dcl/mini-rpc": "^1.0.7",
"@dcl/schemas": "^11.4.0",
"@dcl/schemas": "^11.5.0",
"@dcl/sdk": "7.4.17",
"@dcl/single-sign-on-client": "^0.1.0",
"@dcl/ui-env": "^1.5.0",
Expand All @@ -38,10 +38,10 @@
"decentraland-builder-scripts": "^0.24.0",
"decentraland-connect": "^6.3.1",
"decentraland-crypto-fetch": "^2.0.1",
"decentraland-dapps": "^19.5.1",
"decentraland-dapps": "^19.5.3",
"decentraland-ecs": "6.12.4-7784644013.commit-f770b3e",
"decentraland-experiments": "^1.0.2",
"decentraland-transactions": "^2.0.3",
"decentraland-transactions": "^2.6.1",
"decentraland-ui": "^5.17.1",
"ethers": "^5.6.8",
"file-saver": "^2.0.1",
Expand Down
5 changes: 4 additions & 1 deletion src/lib/urn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import { getChainIdByNetwork } from 'decentraland-dapps/dist/lib/eth'
* (?<protocol>
* mainnet|
* goerli|
* sepolia|
* matic|
* mumbai|
* amoy|
* off-chain
* ):
* )?
Expand All @@ -32,7 +34,7 @@ import { getChainIdByNetwork } from 'decentraland-dapps/dist/lib/eth'
* )
*/
const baseMatcher = 'urn:decentraland'
const protocolMatcher = '(?<protocol>mainnet|goerli|sepolia|matic|mumbai|off-chain)'
const protocolMatcher = '(?<protocol>mainnet|goerli|sepolia|matic|mumbai|amoy|off-chain)'
const typeMatcher = '(?<type>base-avatars|collections-v2|collections-thirdparty|entity)'

const baseAvatarsSuffixMatcher = '((?<=base-avatars:)BaseMale|BaseFemale)'
Expand All @@ -47,6 +49,7 @@ export enum URNProtocol {
SEPOLIA = 'sepolia',
MATIC = 'matic',
MUMBAI = 'mumbai',
AMOY = 'amoy',
OFF_CHAIN = 'off-chain'
}
export enum URNType {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/collection/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ export function* collectionSaga(legacyBuilderClient: BuilderAPI, client: Builder
partnerId = '01HRRQQ70YK4SP88GHM9A61P6B'
commodity = 'TT'
scAddress = '0xe539E0AED3C1971560517D58277f8dd9aC296281'
network = 'mumbai'
network = 'mumbai' // TODO: Update to amoy when wert support it
origin = 'https://sandbox.wert.io'
break
case 'prod':
Expand Down
2 changes: 1 addition & 1 deletion src/modules/item/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ export function* itemSaga(legacyBuilder: LegacyBuilderAPI, builder: BuilderClien
throw new ItemSkinTooBigError()
}

if (!isSkin && finalModelSize > MAX_WEARABLE_FILE_SIZE) {
if (!isSkin && !isEmote && finalModelSize > MAX_WEARABLE_FILE_SIZE) {
throw new ItemWearableTooBigError()
}
}
Expand Down

0 comments on commit 334ed3e

Please sign in to comment.