forked from lthn/blockchain
implement net_time_delta_median
This commit is contained in:
parent
0933026c2a
commit
9f34597d2a
5 changed files with 7 additions and 7 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -19,7 +19,7 @@ export class VariablesService {
|
|||
public defaultCurrency = 'ZANO';
|
||||
public opening_wallet: Wallet;
|
||||
public exp_med_ts = 0;
|
||||
public ts_diff = 0;
|
||||
public net_time_delta_median = 0;
|
||||
public height_app = 0;
|
||||
public last_build_available = '';
|
||||
public last_build_displaymode = 0;
|
||||
|
|
@ -77,7 +77,6 @@ export class VariablesService {
|
|||
setExpMedTs(timestamp: number) {
|
||||
if (timestamp !== this.exp_med_ts) {
|
||||
this.exp_med_ts = timestamp;
|
||||
this.ts_diff = Math.abs(new Date().getTime() - (timestamp * 1000));
|
||||
this.getExpMedTsEvent.next(timestamp);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
console.log(data);
|
||||
// this.variablesService.exp_med_ts = data['expiration_median_timestamp'] + 600 + 1;
|
||||
this.variablesService.setExpMedTs(data['expiration_median_timestamp'] + 600 + 1);
|
||||
this.variablesService.net_time_delta_median = data.net_time_delta_median;
|
||||
this.variablesService.last_build_available = data.last_build_available;
|
||||
this.variablesService.last_build_displaymode = data.last_build_displaymode;
|
||||
this.variablesService.setHeightApp(data.height);
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@
|
|||
<i class="icon update critical" tooltip="{{ 'SIDEBAR.UPDATE.CRITICAL_TOOLTIP' | translate }}" placement="right-bottom" tooltipClass="update-tooltip critical" [delay]="500"></i>
|
||||
</ng-container>
|
||||
</div>
|
||||
<div class="update-container" *ngIf="false">
|
||||
<div class="update-container" *ngIf="variablesService.daemon_state === 2 && variablesService.net_time_delta_median !== 0">
|
||||
<div class="update-text time">
|
||||
<span>{{ 'SIDEBAR.UPDATE.TIME' | translate }}</span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue