Skip to content

Commit b544cf6

Browse files
extend features flags config values
1 parent 10f304b commit b544cf6

File tree

7 files changed

+103
-9
lines changed

7 files changed

+103
-9
lines changed

config/config.devnet.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ features:
5151
serviceUrl: 'https://devnet-data-api.multiversx.com'
5252
assetsFetch:
5353
enabled: true
54-
assetesUrl: 'https://tools.multiversx.com/assets-cdn'
54+
assetsUrl: 'https://tools.multiversx.com/assets-cdn'
5555
mediaRedirect:
5656
enabled: false
5757
storageUrls:
@@ -112,7 +112,7 @@ features:
112112
enabled: true
113113
serviceUrl: 'https://devnet-api.multiversx.com'
114114
tokensFetch:
115-
enabled: true
115+
enabled: false
116116
serviceUrl: 'https://devnet-api.multiversx.com'
117117
providersFetch:
118118
enabled: true

config/config.e2e.mainnet.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ features:
116116
serviceUrl: 'https://api.multiversx.com'
117117
assetsFetch:
118118
enabled: false
119-
assetesUrl: 'https://tools.multiversx.com/assets-cdn'
119+
asseteUrl: 'https://tools.multiversx.com/assets-cdn'
120120
image:
121121
width: 600
122122
height: 600

config/config.mainnet.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ features:
109109
enabled: true
110110
serviceUrl: 'https://api.multiversx.com'
111111
tokensFetch:
112-
enabled: true
112+
enabled: false
113113
serviceUrl: 'https://api.multiversx.com'
114114
providersFetch:
115115
enabled: true
116116
serviceUrl: 'https://api.multiversx.com'
117117
assetsFetch:
118118
enabled: true
119-
assetesUrl: 'https://tools.multiversx.com/assets-cdn'
119+
assetsUrl: 'https://tools.multiversx.com/assets-cdn'
120120
mediaRedirect:
121121
enabled: false
122122
storageUrls:

config/config.testnet.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ features:
108108
enabled: true
109109
serviceUrl: 'https://testnet-api.multiversx.com'
110110
tokensFetch:
111-
enabled: true
111+
enabled: false
112112
serviceUrl: 'https://testnet-api.multiversx.com'
113113
providersFetch:
114114
enabled: true
115115
serviceUrl: 'https://testnet-api.multiversx.com'
116116
assetsFetch:
117117
enabled: true
118-
assetesUrl: 'https://tools.multiversx.com/assets-cdn'
118+
assetsUrl: 'https://tools.multiversx.com/assets-cdn'
119119
mediaRedirect:
120120
enabled: false
121121
storageUrls:

src/common/api-config/api.config.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,9 @@ export class ApiConfigService {
893893
}
894894

895895
getAssetsCdnUrl(): string {
896-
return this.configService.get<string>('features.assetsFetch.assetesUrl') ?? 'https://tools.multiversx.com/assets-cdn';
896+
return this.configService.get<string>('features.assetsFetch.assetsUrl')
897+
?? this.configService.get<string>('features.assetsFetch.assetesUrl')
898+
?? 'https://tools.multiversx.com/assets-cdn';
897899
}
898900

899901
isTokensFetchFeatureEnabled(): boolean {

src/endpoints/network/entities/feature.configs.ts

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,84 @@ export class FeatureConfigs {
55
Object.assign(this, init);
66
}
77

8+
@ApiProperty({ description: 'Events notifier flag activation value' })
9+
eventsNotifier: boolean = false;
10+
11+
@ApiProperty({ description: 'Guest caching flag activation value' })
12+
guestCaching: boolean = false;
13+
14+
@ApiProperty({ description: 'Transaction pool flag activation value' })
15+
transactionPool: boolean = false;
16+
17+
@ApiProperty({ description: 'Transaction pool warmer flag activation value' })
18+
transactionPoolWarmer: boolean = false;
19+
820
@ApiProperty({ description: 'Update Collection extra details flag activation value' })
921
updateCollectionExtraDetails: boolean = false;
1022

23+
@ApiProperty({ description: 'Accounts extra details update flag activation value' })
24+
updateAccountsExtraDetails: boolean = false;
25+
1126
@ApiProperty({ description: 'Marketplace flag activation value' })
1227
marketplace: boolean = false;
1328

1429
@ApiProperty({ description: 'Exchange flag activation value' })
1530
exchange: boolean = false;
1631

17-
@ApiProperty({ description: 'DataApi flag activation value' })
32+
@ApiProperty({ description: 'Data API flag activation value' })
1833
dataApi: boolean = false;
34+
35+
@ApiProperty({ description: 'Authentication flag activation value' })
36+
auth: boolean = false;
37+
38+
@ApiProperty({ description: 'Staking V4 flag activation value' })
39+
stakingV4: boolean = false;
40+
41+
@ApiProperty({ description: 'Chain Andromeda flag activation value' })
42+
chainAndromeda: boolean = false;
43+
44+
@ApiProperty({ description: 'Node epochs left flag activation value' })
45+
nodeEpochsLeft: boolean = false;
46+
47+
@ApiProperty({ description: 'Transaction processor flag activation value' })
48+
transactionProcessor: boolean = false;
49+
50+
@ApiProperty({ description: 'Transaction completed flag activation value' })
51+
transactionCompleted: boolean = false;
52+
53+
@ApiProperty({ description: 'Transaction batch flag activation value' })
54+
transactionBatch: boolean = false;
55+
56+
@ApiProperty({ description: 'Deep history flag activation value' })
57+
deepHistory: boolean = false;
58+
59+
@ApiProperty({ description: 'Elastic circuit breaker flag activation value' })
60+
elasticCircuitBreaker: boolean = false;
61+
62+
@ApiProperty({ description: 'Status checker flag activation value' })
63+
statusChecker: boolean = false;
64+
65+
@ApiProperty({ description: 'NFT scam info flag activation value' })
66+
nftScamInfo: boolean = false;
67+
68+
@ApiProperty({ description: 'NFT processing flag activation value' })
69+
processNfts: boolean = false;
70+
71+
@ApiProperty({ description: 'TPS flag activation value' })
72+
tps: boolean = false;
73+
74+
@ApiProperty({ description: 'Nodes fetch flag activation value' })
75+
nodesFetch: boolean = false;
76+
77+
@ApiProperty({ description: 'Tokens fetch flag activation value' })
78+
tokensFetch: boolean = false;
79+
80+
@ApiProperty({ description: 'Providers fetch flag activation value' })
81+
providersFetch: boolean = false;
82+
83+
@ApiProperty({ description: 'Assets fetch flag activation value' })
84+
assetsFetch: boolean = false;
85+
86+
@ApiProperty({ description: 'Media redirect flag activation value' })
87+
mediaRedirect: boolean = false;
1988
}

src/endpoints/network/network.service.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,33 @@ export class NetworkService {
312312
}
313313

314314
const features = new FeatureConfigs({
315+
eventsNotifier: this.apiConfigService.isEventsNotifierFeatureActive(),
316+
guestCaching: this.apiConfigService.isGuestCacheFeatureActive(),
317+
transactionPool: this.apiConfigService.isTransactionPoolEnabled(),
318+
transactionPoolWarmer: this.apiConfigService.getIsCacheWarmerCronActive(),
315319
updateCollectionExtraDetails: this.apiConfigService.isUpdateCollectionExtraDetailsEnabled(),
320+
updateAccountsExtraDetails: this.apiConfigService.isUpdateAccountExtraDetailsEnabled(),
316321
marketplace: this.apiConfigService.isMarketplaceFeatureEnabled(),
317322
exchange: this.apiConfigService.isExchangeEnabled(),
318323
dataApi: this.apiConfigService.isDataApiFeatureEnabled(),
324+
auth: this.apiConfigService.getIsAuthActive(),
325+
stakingV4: this.apiConfigService.isStakingV4Enabled(),
326+
chainAndromeda: this.apiConfigService.isChainAndromedaEnabled(),
327+
nodeEpochsLeft: this.apiConfigService.isNodeEpochsLeftEnabled(),
328+
transactionProcessor: this.apiConfigService.getIsTransactionProcessorCronActive(),
329+
transactionCompleted: this.apiConfigService.getIsTransactionCompletedCronActive(),
330+
transactionBatch: this.apiConfigService.getIsTransactionBatchCronActive(),
331+
deepHistory: this.apiConfigService.isDeepHistoryGatewayEnabled(),
332+
elasticCircuitBreaker: this.apiConfigService.isElasticCircuitBreakerEnabled(),
333+
statusChecker: this.apiConfigService.getIsApiStatusCheckerActive(),
334+
nftScamInfo: this.apiConfigService.getIsNftScamInfoEnabled(),
335+
processNfts: this.apiConfigService.getIsProcessNftsFlagActive(),
336+
tps: this.apiConfigService.isTpsEnabled(),
337+
nodesFetch: this.apiConfigService.isNodesFetchFeatureEnabled(),
338+
tokensFetch: this.apiConfigService.isTokensFetchFeatureEnabled(),
339+
providersFetch: this.apiConfigService.isProvidersFetchFeatureEnabled(),
340+
assetsFetch: this.apiConfigService.isAssetsCdnFeatureEnabled(),
341+
mediaRedirect: this.apiConfigService.isMediaRedirectFeatureEnabled(),
319342
});
320343

321344
let indexerVersion: string | undefined;

0 commit comments

Comments
 (0)