Add previous adjustment retarget. (#655)

* Add previous adjustment retarget.

* Fix green color.
Add + symbol to difficulty change.

* Add previousRetarget to websocket.

* Add previous retarget.
This commit is contained in:
Miguel Medeiros
2021-07-24 19:26:48 -03:00
committed by GitHub
parent f6a889298c
commit cd8e308870
6 changed files with 29 additions and 15 deletions

View File

@@ -47,7 +47,7 @@ export class WebsocketService {
this.network = this.stateService.network === 'bisq' && !this.stateService.env.BISQ_SEPARATE_BACKEND ? '' : this.stateService.network;
this.websocketSubject = webSocket<WebsocketResponse>(this.webSocketUrl.replace('{network}', this.network ? '/' + this.network : ''));
const theInitData = this.transferState.get(initData, null);
const theInitData = this.transferState.get<any>(initData, null);
if (theInitData) {
this.handleResponse(theInitData.body);
this.startSubscription(false, true);
@@ -290,6 +290,10 @@ export class WebsocketService {
this.stateService.lastDifficultyAdjustment$.next(response.lastDifficultyAdjustment);
}
if (response.previousRetarget !== undefined) {
this.stateService.previousRetarget$.next(response.previousRetarget);
}
if (response['git-commit']) {
this.stateService.backendInfo$.next(response['git-commit']);
}