Skip to content

Commit c1c7113

Browse files
committed
fixes
1 parent 07699fe commit c1c7113

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,9 +1074,6 @@ export class ApiConfigService {
10741074
}
10751075

10761076
getSupernovaActivationEpoch(): number {
1077-
if (!this.isChainSupernovaEnabled()) {
1078-
return TimeUtils.TIMESTAMP_IN_SECONDS_THRESHOLD + 1;
1079-
}
10801077
const epoch = this.configService.get<number>('features.chainSupernova.activation.epoch');
10811078
if (epoch == null) {
10821079
return TimeUtils.TIMESTAMP_IN_SECONDS_THRESHOLD + 1;
@@ -1086,9 +1083,6 @@ export class ApiConfigService {
10861083
}
10871084

10881085
getSupernovaActivationTimestamp(): number {
1089-
if (!this.isChainSupernovaEnabled()) {
1090-
return TimeUtils.TIMESTAMP_IN_SECONDS_THRESHOLD + 1;
1091-
}
10921086
const timestamp = this.configService.get<number>('features.chainSupernova.activation.timestamp');
10931087
if (timestamp == null) {
10941088
return TimeUtils.TIMESTAMP_IN_SECONDS_THRESHOLD + 1;

src/utils/timestamp.parse.pipe.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ export class TimestampParsePipe implements PipeTransform {
2121
}
2222

2323
const normalizedInputMs = TimeUtils.isTimestampInSeconds(valNumber) ? valNumber * 1000 : valNumber;
24+
if (!this.apiConfigService.isChainSupernovaEnabled()) {
25+
return Math.floor(normalizedInputMs / 1000);
26+
}
2427

2528
const supernovaActivationTimestampMs = this.apiConfigService.getSupernovaActivationTimestamp() * 1000;
2629

0 commit comments

Comments
 (0)