Skip to content

Commit

Permalink
chore: bump content-validator version to 1.4.0 (#982)
Browse files Browse the repository at this point in the history
  • Loading branch information
guidota authored Mar 29, 2022
1 parent 8a4ad31 commit cd71419
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 104 deletions.
2 changes: 1 addition & 1 deletion content/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@dcl/catalyst-api-specs": "1.1.0",
"@dcl/catalyst-contracts": "1.0.2",
"@dcl/catalyst-node-commons": "1.0.1",
"@dcl/content-validator": "1.3.0",
"@dcl/content-validator": "1.4.0",
"@dcl/hashing": "^1.0.0",
"@dcl/snapshots-fetcher": "3.0.1",
"@dcl/schemas": "4.0.0",
Expand Down
15 changes: 15 additions & 0 deletions content/src/Environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export const DEFAULT_COLLECTIONS_SUBGRAPH_MATIC_MUMBAI =
'https://api.thegraph.com/subgraphs/name/decentraland/collections-matic-mumbai'
export const DEFAULT_COLLECTIONS_SUBGRAPH_MATIC_MAINNET =
'https://api.thegraph.com/subgraphs/name/decentraland/collections-matic-mainnet'
export const DEFAULT_THIRD_PARTY_REGISTRY_SUBGRAPH_MATIC_MUMBAI =
'https://api.thegraph.com/subgraphs/name/decentraland/tpr-matic-mumbai'
export const DEFAULT_THIRD_PARTY_REGISTRY_SUBGRAPH_MATIC_MAINNET =
'https://api.thegraph.com/subgraphs/name/decentraland/tpr-matic-mainnet'
export const DEFAULT_BLOCKS_SUBGRAPH_ROPSTEN =
'https://api.thegraph.com/subgraphs/name/decentraland/blocks-ethereum-ropsten'
export const DEFAULT_BLOCKS_SUBGRAPH_MAINNET =
Expand Down Expand Up @@ -107,6 +111,7 @@ export enum EnvironmentConfig {
LAND_MANAGER_SUBGRAPH_URL,
COLLECTIONS_L1_SUBGRAPH_URL,
COLLECTIONS_L2_SUBGRAPH_URL,
THIRD_PARTY_REGISTRY_L2_SUBGRAPH_URL,
PROOF_OF_WORK,
PSQL_PASSWORD,
PSQL_USER,
Expand Down Expand Up @@ -260,6 +265,16 @@ export class EnvironmentBuilder {
: DEFAULT_COLLECTIONS_SUBGRAPH_MATIC_MUMBAI)
)

this.registerConfigIfNotAlreadySet(
env,
EnvironmentConfig.THIRD_PARTY_REGISTRY_L2_SUBGRAPH_URL,
() =>
process.env.COLLECTIONS_L2_SUBGRAPH_URL ??
(process.env.ETH_NETWORK === 'mainnet'
? DEFAULT_THIRD_PARTY_REGISTRY_SUBGRAPH_MATIC_MAINNET
: DEFAULT_THIRD_PARTY_REGISTRY_SUBGRAPH_MATIC_MUMBAI)
)

this.registerConfigIfNotAlreadySet(
env,
EnvironmentConfig.BLOCKS_L1_SUBGRAPH_URL,
Expand Down
3 changes: 2 additions & 1 deletion content/src/service/validations/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export function createValidator(
},
L2: {
blocks: components.env.getConfig(EnvironmentConfig.BLOCKS_L2_SUBGRAPH_URL),
collections: components.env.getConfig(EnvironmentConfig.COLLECTIONS_L2_SUBGRAPH_URL)
collections: components.env.getConfig(EnvironmentConfig.COLLECTIONS_L2_SUBGRAPH_URL),
thirdPartyRegistry: components.env.getConfig(EnvironmentConfig.THIRD_PARTY_REGISTRY_L2_SUBGRAPH_URL)
}
}
}
Expand Down
Loading

0 comments on commit cd71419

Please sign in to comment.