From b95efca29d9145222cb49167565d46b97a61187f Mon Sep 17 00:00:00 2001 From: softsimon Date: Mon, 28 Sep 2020 16:32:48 +0700 Subject: [PATCH] Various bugfixes. --- backend/src/api/fee-api.ts | 6 +++--- frontend/src/app/components/about/about.component.ts | 2 +- .../src/app/components/amount/amount.component.html | 2 +- frontend/src/app/components/asset/asset.component.html | 2 +- .../src/app/components/fees-box/fees-box.component.ts | 10 ++++++++-- .../latest-blocks/latest-blocks.component.ts | 2 +- frontend/src/app/dashboard/dashboard.component.html | 6 +++--- frontend/src/app/dashboard/dashboard.component.ts | 3 +++ frontend/src/app/services/websocket.service.ts | 2 ++ 9 files changed, 23 insertions(+), 12 deletions(-) diff --git a/backend/src/api/fee-api.ts b/backend/src/api/fee-api.ts index a5d88bbe5..1fc497465 100644 --- a/backend/src/api/fee-api.ts +++ b/backend/src/api/fee-api.ts @@ -10,9 +10,9 @@ class FeeApi { const pBlocks = projectedBlocks.getMempoolBlocks(); if (!pBlocks.length) { return { - 'fastestFee': 0, - 'halfHourFee': 0, - 'hourFee': 0, + 'fastestFee': this.defaultFee, + 'halfHourFee': this.defaultFee, + 'hourFee': this.defaultFee, }; } let firstMedianFee = Math.ceil(pBlocks[0].medianFee); diff --git a/frontend/src/app/components/about/about.component.ts b/frontend/src/app/components/about/about.component.ts index ae8666bd4..4c1494132 100644 --- a/frontend/src/app/components/about/about.component.ts +++ b/frontend/src/app/components/about/about.component.ts @@ -23,7 +23,7 @@ export class AboutComponent implements OnInit { ngOnInit() { this.gitCommit$ = this.stateService.gitCommit$; - this.seoService.setTitle('Contributors'); + this.seoService.setTitle('About'); this.websocketService.want(['blocks']); if (this.stateService.network === 'bisq') { this.active = 2; diff --git a/frontend/src/app/components/amount/amount.component.html b/frontend/src/app/components/amount/amount.component.html index c4c575267..b453ce6d0 100644 --- a/frontend/src/app/components/amount/amount.component.html +++ b/frontend/src/app/components/amount/amount.component.html @@ -2,7 +2,7 @@ {{ conversions.USD * (satoshis / 100000000) | currency:'USD':'symbol':'1.2-2' }} - + Confidential diff --git a/frontend/src/app/components/asset/asset.component.html b/frontend/src/app/components/asset/asset.component.html index 25fd93e82..f7b6059b2 100644 --- a/frontend/src/app/components/asset/asset.component.html +++ b/frontend/src/app/components/asset/asset.component.html @@ -57,7 +57,7 @@ Circulating amount - {{ (asset.chain_stats.issued_amount - asset.chain_stats.burned_amount) | number: '1.0-' + assetContract[3] }} {{ assetContract[1] }} + {{ (asset.chain_stats.issued_amount - asset.chain_stats.burned_amount) / 100000000 | number: '1.0-' + assetContract[3] }} {{ assetContract[1] }} Circulating amount diff --git a/frontend/src/app/components/fees-box/fees-box.component.ts b/frontend/src/app/components/fees-box/fees-box.component.ts index 72d137ccb..9e7a53136 100644 --- a/frontend/src/app/components/fees-box/fees-box.component.ts +++ b/frontend/src/app/components/fees-box/fees-box.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core'; import { StateService } from 'src/app/services/state.service'; import { map, filter } from 'rxjs/operators'; -import { Observable } from 'rxjs'; +import { merge, Observable } from 'rxjs'; interface FeeEstimations { fastestFee: number; @@ -29,8 +29,14 @@ export class FeesBoxComponent implements OnInit { this.isLoadingWebSocket$ = this.stateService.isLoadingWebSocket$; this.feeEstimations$ = this.stateService.mempoolBlocks$ .pipe( - filter((blocks) => !!blocks.length), map((pBlocks) => { + if (!pBlocks.length) { + return { + 'fastestFee': defaultFee, + 'halfHourFee': defaultFee, + 'hourFee': defaultFee, + }; + } let firstMedianFee = Math.ceil(pBlocks[0].medianFee); if (pBlocks.length === 1 && pBlocks[0].blockVSize <= 500000) { diff --git a/frontend/src/app/components/latest-blocks/latest-blocks.component.ts b/frontend/src/app/components/latest-blocks/latest-blocks.component.ts index c773c91b9..f67bcccb2 100644 --- a/frontend/src/app/components/latest-blocks/latest-blocks.component.ts +++ b/frontend/src/app/components/latest-blocks/latest-blocks.component.ts @@ -34,7 +34,7 @@ export class LatestBlocksComponent implements OnInit, OnDestroy { ) { } ngOnInit() { - this.seoService.resetTitle(); + this.seoService.setTitle('Blocks'); this.websocketService.want(['blocks']); this.network$ = merge(of(''), this.stateService.networkChanged$); diff --git a/frontend/src/app/dashboard/dashboard.component.html b/frontend/src/app/dashboard/dashboard.component.html index 6b803feb8..b21c5f720 100644 --- a/frontend/src/app/dashboard/dashboard.component.html +++ b/frontend/src/app/dashboard/dashboard.component.html @@ -111,15 +111,15 @@ - - + + - + diff --git a/frontend/src/app/dashboard/dashboard.component.ts b/frontend/src/app/dashboard/dashboard.component.ts index 60fb229ec..d0e1eed08 100644 --- a/frontend/src/app/dashboard/dashboard.component.ts +++ b/frontend/src/app/dashboard/dashboard.component.ts @@ -9,6 +9,7 @@ import { StateService } from '../services/state.service'; import * as Chartist from 'chartist'; import { formatDate } from '@angular/common'; import { WebsocketService } from '../services/websocket.service'; +import { SeoService } from '../services/seo.service'; interface MempoolBlocksData { blocks: number; @@ -58,9 +59,11 @@ export class DashboardComponent implements OnInit { private stateService: StateService, private apiService: ApiService, private websocketService: WebsocketService, + private seoService: SeoService, ) { } ngOnInit(): void { + this.seoService.resetTitle(); this.websocketService.want(['blocks', 'stats', 'mempool-blocks', 'live-2h-chart']); this.network$ = merge(of(''), this.stateService.networkChanged$); diff --git a/frontend/src/app/services/websocket.service.ts b/frontend/src/app/services/websocket.service.ts index a1d7e341f..8bc94e8c2 100644 --- a/frontend/src/app/services/websocket.service.ts +++ b/frontend/src/app/services/websocket.service.ts @@ -110,6 +110,8 @@ export class WebsocketService { } if (response['git-commit']) { + this.stateService.gitCommit$.next(response['git-commit']); + if (!this.latestGitCommit) { this.latestGitCommit = response['git-commit']; } else {
TXIDAmount (BTC)USDAmountUSD Fee
{{ transaction.txid | shortenString : 10 }} {{ transaction.fee / (transaction.weight / 4) | number : '1.1-1' }} sat/vB