Only display 0-1sat/vB on Liquid.

This commit is contained in:
softsimon 2020-03-28 19:24:13 +07:00
parent 2f83da7ce9
commit 24c23f1ee8
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
4 changed files with 25 additions and 4 deletions

View File

@ -48,6 +48,7 @@
height: 12px; height: 12px;
position: absolute; position: absolute;
left: 0; left: 0;
bottom: 3px;
content: ''; content: '';
border: 3px solid transparent; border: 3px solid transparent;
border-radius: 2px; border-radius: 2px;

View File

@ -13,6 +13,7 @@ import { ApiService } from '../../services/api.service';
import * as Chartist from 'chartist'; import * as Chartist from 'chartist';
import { StateService } from 'src/app/services/state.service'; import { StateService } from 'src/app/services/state.service';
import { SeoService } from 'src/app/services/seo.service'; import { SeoService } from 'src/app/services/seo.service';
import { environment } from 'src/environments/environment';
@Component({ @Component({
selector: 'app-statistics', selector: 'app-statistics',
@ -20,6 +21,8 @@ import { SeoService } from 'src/app/services/seo.service';
styleUrls: ['./statistics.component.scss'] styleUrls: ['./statistics.component.scss']
}) })
export class StatisticsComponent implements OnInit { export class StatisticsComponent implements OnInit {
network = environment.network;
loading = true; loading = true;
spinnerLoading = false; spinnerLoading = false;
@ -99,7 +102,10 @@ export class StatisticsComponent implements OnInit {
return '500+'; return '500+';
} }
if (i === 0) { if (i === 0) {
return '1 sat/vbyte'; if (this.network === 'liquid') {
return '0 - 1';
}
return '1 sat/vB';
} }
return arr[i - 1] + ' - ' + sats; return arr[i - 1] + ' - ' + sats;
}) })
@ -194,6 +200,11 @@ export class StatisticsComponent implements OnInit {
const finalArrayVbyte = this.generateArray(mempoolStats); const finalArrayVbyte = this.generateArray(mempoolStats);
// Only Liquid has lower than 1 sat/vb transactions
if (this.network !== 'liquid') {
finalArrayVbyte.shift();
}
this.mempoolVsizeFeesData = { this.mempoolVsizeFeesData = {
labels: labels, labels: labels,
series: finalArrayVbyte series: finalArrayVbyte

View File

@ -8,6 +8,7 @@ import { OptimizedMempoolStats } from '../../interfaces/node-api.interface';
import { StateService } from 'src/app/services/state.service'; import { StateService } from 'src/app/services/state.service';
import { ApiService } from 'src/app/services/api.service'; import { ApiService } from 'src/app/services/api.service';
import { SeoService } from 'src/app/services/seo.service'; import { SeoService } from 'src/app/services/seo.service';
import { environment } from 'src/environments/environment';
@Component({ @Component({
selector: 'app-television', selector: 'app-television',
@ -16,6 +17,7 @@ import { SeoService } from 'src/app/services/seo.service';
}) })
export class TelevisionComponent implements OnInit { export class TelevisionComponent implements OnInit {
loading = true; loading = true;
network = environment.network;
mempoolStats: OptimizedMempoolStats[] = []; mempoolStats: OptimizedMempoolStats[] = [];
mempoolVsizeFeesData: any; mempoolVsizeFeesData: any;
@ -65,7 +67,10 @@ export class TelevisionComponent implements OnInit {
return '350+'; return '350+';
} }
if (i === 0) { if (i === 0) {
return '1 sat/vbyte'; if (this.network === 'liquid') {
return '0 - 1';
}
return '1 sat/vB';
} }
return arr[i - 1] + ' - ' + sats; return arr[i - 1] + ' - ' + sats;
}) })
@ -94,6 +99,11 @@ export class TelevisionComponent implements OnInit {
const finalArrayVbyte = this.generateArray(mempoolStats); const finalArrayVbyte = this.generateArray(mempoolStats);
// Only Liquid has lower than 1 sat/vb transactions
if (this.network !== 'liquid') {
finalArrayVbyte.shift();
}
this.mempoolVsizeFeesData = { this.mempoolVsizeFeesData = {
labels: labels, labels: labels,
series: finalArrayVbyte series: finalArrayVbyte

View File

@ -129,7 +129,6 @@ body {
margin-bottom: 0; margin-bottom: 0;
} }
.close { .close {
color: #fff; color: #fff;
} }
@ -162,7 +161,6 @@ body {
/* Chartist */ /* Chartist */
$ct-series-names: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z); $ct-series-names: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z);
$ct-series-colors: ( $ct-series-colors: (
#b71c1c,
#D81B60, #D81B60,
#8E24AA, #8E24AA,
#5E35B1, #5E35B1,
@ -262,6 +260,7 @@ $ct-series-colors: (
height: 12px; height: 12px;
position: absolute; position: absolute;
left: 0; left: 0;
bottom: 3px;
content: ''; content: '';
border: 3px solid transparent; border: 3px solid transparent;
border-radius: 2px; border-radius: 2px;