We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f60bfd9 + 6ae86f1 commit bb8b755Copy full SHA for bb8b755
1 file changed
src/endpoints/dapp-config/dapp.config.service.ts
@@ -22,15 +22,20 @@ export class DappConfigService {
22
23
const networkConfig = await this.gatewayService.getNetworkConfig();
24
const refreshRate = networkConfig.erd_round_duration;
25
+ const chainId = networkConfig.erd_chain_id;
26
- if (refreshRate) {
27
- return {
28
- ...this.dappConfig,
29
- refreshRate,
30
- };
+ const overrides: Partial<DappConfig> = {};
+ if (refreshRate != null) {
+ overrides.refreshRate = refreshRate;
+ }
31
+ if (chainId != null) {
32
+ overrides.chainId = chainId;
33
}
34
- return this.dappConfig;
35
+ return {
36
+ ...this.dappConfig,
37
+ ...overrides,
38
+ };
39
40
41
getDappConfigurationRaw(): DappConfig | undefined {
0 commit comments