mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 06:47:52 +01:00
Merge branch 'master' into natsoni/acceleration-timeline
This commit is contained in:
commit
bdd51a0f4b
14 changed files with 43 additions and 19 deletions
14
backend/package-lock.json
generated
14
backend/package-lock.json
generated
|
@ -23,7 +23,7 @@
|
|||
"rust-gbt": "file:./rust-gbt",
|
||||
"socks-proxy-agent": "~7.0.0",
|
||||
"typescript": "~4.9.3",
|
||||
"ws": "~8.17.1"
|
||||
"ws": "~8.18.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/code-frame": "^7.18.6",
|
||||
|
@ -7690,9 +7690,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.17.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
||||
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
||||
"version": "8.18.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
|
||||
"integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
|
@ -13424,9 +13424,9 @@
|
|||
}
|
||||
},
|
||||
"ws": {
|
||||
"version": "8.17.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
||||
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
||||
"version": "8.18.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
|
||||
"integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
|
||||
"requires": {}
|
||||
},
|
||||
"y18n": {
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
"redis": "^4.6.6",
|
||||
"socks-proxy-agent": "~7.0.0",
|
||||
"typescript": "~4.9.3",
|
||||
"ws": "~8.17.1"
|
||||
"ws": "~8.18.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/code-frame": "^7.18.6",
|
||||
|
|
|
@ -353,6 +353,9 @@ class MempoolBlocks {
|
|||
for (const txid of Object.keys(candidates?.txs ?? mempool)) {
|
||||
if (txid in mempool) {
|
||||
mempool[txid].cpfpDirty = false;
|
||||
mempool[txid].ancestors = [];
|
||||
mempool[txid].descendants = [];
|
||||
mempool[txid].bestDescendant = null;
|
||||
}
|
||||
}
|
||||
for (const [txid, rate] of rates) {
|
||||
|
|
|
@ -364,7 +364,7 @@
|
|||
</ng-template>
|
||||
<ng-template [ngIf]="error">
|
||||
<app-http-error [error]="error">
|
||||
<span i18n="error.general-loading-data">Error loading data.</span>
|
||||
<span i18n="block.error.loading-block-data">Error loading block data.</span>
|
||||
</app-http-error>
|
||||
</ng-template>
|
||||
|
||||
|
|
|
@ -81,11 +81,13 @@ export class BlocksList implements OnInit {
|
|||
})
|
||||
).subscribe();
|
||||
|
||||
const prevKey = this.dir === 'ltr' ? 'ArrowLeft' : 'ArrowRight';
|
||||
const nextKey = this.dir === 'ltr' ? 'ArrowRight' : 'ArrowLeft';
|
||||
|
||||
this.keyNavigationSubscription = this.stateService.keyNavigation$
|
||||
.pipe(
|
||||
filter((event) => event.key === prevKey || event.key === nextKey),
|
||||
tap((event) => {
|
||||
const prevKey = this.dir === 'ltr' ? 'ArrowLeft' : 'ArrowRight';
|
||||
const nextKey = this.dir === 'ltr' ? 'ArrowRight' : 'ArrowLeft';
|
||||
if (event.key === prevKey && this.page > 1) {
|
||||
this.page--;
|
||||
this.isLoading = true;
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div ngbDropdown class="w-33" *ngIf="stateService.env.ACCELERATOR">
|
||||
<div ngbDropdown class="w-33" *ngIf="stateService.env.ACCELERATOR && isMainnet">
|
||||
<button class="btn btn-primary w-100" id="dropdownBasic1" ngbDropdownToggle i18n="accelerator.accelerations">Accelerations</button>
|
||||
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
|
||||
<a class="dropdown-item" routerLinkActive="active" [routerLink]="['/graphs/acceleration/fees' | relativeUrl]"
|
||||
|
|
|
@ -9,6 +9,7 @@ import { WebsocketService } from '../../services/websocket.service';
|
|||
})
|
||||
export class GraphsComponent implements OnInit {
|
||||
flexWrap = false;
|
||||
isMainnet = this.stateService.isMainnet();
|
||||
|
||||
constructor(
|
||||
public stateService: StateService,
|
||||
|
|
|
@ -73,11 +73,13 @@ export class RecentPegsListComponent implements OnInit {
|
|||
}),
|
||||
).subscribe();
|
||||
|
||||
const prevKey = this.dir === 'ltr' ? 'ArrowLeft' : 'ArrowRight';
|
||||
const nextKey = this.dir === 'ltr' ? 'ArrowRight' : 'ArrowLeft';
|
||||
|
||||
this.keyNavigationSubscription = this.stateService.keyNavigation$
|
||||
.pipe(
|
||||
filter((event) => event.key === prevKey || event.key === nextKey),
|
||||
tap((event) => {
|
||||
const prevKey = this.dir === 'ltr' ? 'ArrowLeft' : 'ArrowRight';
|
||||
const nextKey = this.dir === 'ltr' ? 'ArrowRight' : 'ArrowLeft';
|
||||
if (event.key === prevKey && this.page > 1) {
|
||||
this.page--;
|
||||
this.isLoading = true;
|
||||
|
|
|
@ -71,7 +71,6 @@
|
|||
<a ngbDropdownItem *ngIf="env.SIGNET_ENABLED" class="signet" [class.active]="network.val === 'signet'" [routerLink]="networkPaths['signet'] || '/signet'"><app-svg-images name="signet" width="22" height="22" viewBox="0 0 65 65" style="width: 25px; height: 25px;" class="mainnet mr-1"></app-svg-images> Signet</a>
|
||||
<a ngbDropdownItem *ngIf="env.TESTNET_ENABLED" class="testnet" [class.active]="network.val === 'testnet'" [routerLink]="networkPaths['testnet'] || '/testnet'"><app-svg-images name="testnet" width="22" height="22" viewBox="0 0 65 65" style="width: 25px; height: 25px;" class="mainnet mr-1"></app-svg-images> Testnet3</a>
|
||||
<a ngbDropdownItem *ngIf="env.TESTNET4_ENABLED" class="testnet4" [class.active]="network.val === 'testnet4'" [routerLink]="networkPaths['testnet4'] || '/testnet4'"><app-svg-images name="testnet4" width="22" height="22" viewBox="0 0 65 65" style="width: 25px; height: 25px;" class="mainnet mr-1"></app-svg-images> Testnet4 <span class="badge badge-pill badge-warning beta-network" i18n="beta">beta</span></a>
|
||||
<h6 *ngIf="env.LIQUID_ENABLED" class="dropdown-header" i18n="master-page.layer2-networks-header">Layer 2 Networks</h6>
|
||||
<a [href]="env.LIQUID_WEBSITE_URL + urlLanguage + (networkPaths['liquid'] || '')" ngbDropdownItem *ngIf="env.LIQUID_ENABLED" class="liquid" [class.active]="network.val === 'liquid'"><app-svg-images name="liquid" width="22" height="22" viewBox="0 0 125 125" style="width: 25px; height: 25px;" class="mainnet mr-1"></app-svg-images> Liquid</a>
|
||||
<a [href]="env.LIQUID_WEBSITE_URL + urlLanguage + (networkPaths['liquidtestnet'] || '/testnet')" ngbDropdownItem *ngIf="env.LIQUID_TESTNET_ENABLED" class="liquidtestnet" [class.active]="network.val === 'liquid'"><app-svg-images name="liquidtestnet" width="22" height="22" viewBox="0 0 125 125" style="width: 25px; height: 25px;" class="mainnet mr-1"></app-svg-images> Liquid Testnet</a>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<app-indexing-progress></app-indexing-progress>
|
||||
|
||||
<div class="container-xl">
|
||||
<div class="container-xl" *ngIf="!error; else errorTemplate">
|
||||
|
||||
<!-- Pool overview -->
|
||||
<div *ngIf="poolStats$ | async as poolStats; else loadingMain">
|
||||
|
@ -459,4 +459,11 @@
|
|||
|
||||
<ng-template #emptyTd>
|
||||
<td class="text-center"></td>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #errorTemplate>
|
||||
<br>
|
||||
<app-http-error [error]="error">
|
||||
<span i18n="pool.error.loading-pool-data">Error loading pool data.</span>
|
||||
</app-http-error>
|
||||
</ng-template>
|
|
@ -9,6 +9,7 @@ import { StateService } from '../../services/state.service';
|
|||
import { selectPowerOfTen } from '../../bitcoin.utils';
|
||||
import { formatNumber } from '@angular/common';
|
||||
import { SeoService } from '../../services/seo.service';
|
||||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
|
||||
interface AccelerationTotal {
|
||||
cost: number,
|
||||
|
@ -33,6 +34,7 @@ export class PoolComponent implements OnInit {
|
|||
blocks$: Observable<BlockExtended[]>;
|
||||
oobFees$: Observable<AccelerationTotal[]>;
|
||||
isLoading = true;
|
||||
error: HttpErrorResponse | null = null;
|
||||
|
||||
chartOptions: EChartsOption = {};
|
||||
chartInitOptions = {
|
||||
|
@ -105,6 +107,10 @@ export class PoolComponent implements OnInit {
|
|||
}
|
||||
return this.apiService.getPoolBlocks$(this.slug, this.blocks[this.blocks.length - 1]?.height);
|
||||
}),
|
||||
catchError((err) => {
|
||||
this.error = err;
|
||||
return of([]);
|
||||
}),
|
||||
tap((newBlocks) => {
|
||||
this.blocks = this.blocks.concat(newBlocks);
|
||||
}),
|
||||
|
|
|
@ -410,6 +410,10 @@ export class StateService {
|
|||
return this.network === 'liquid' || this.network === 'liquidtestnet';
|
||||
}
|
||||
|
||||
isMainnet(): boolean {
|
||||
return this.env.ROOT_NETWORK === '' && this.network === '';
|
||||
}
|
||||
|
||||
isAnyTestnet(): boolean {
|
||||
return ['testnet', 'testnet4', 'signet', 'liquidtestnet'].includes(this.network);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@ import { Pipe, PipeTransform } from '@angular/core';
|
|||
@Pipe({ name: 'httpErrorMsg' })
|
||||
export class HttpErrorPipe implements PipeTransform {
|
||||
transform(e: HttpErrorResponse | null): string {
|
||||
return e ? `${e.status}: ${e.statusText}` : '';
|
||||
return e ? `${e.status} ${e.statusText}: ${e.error}` : '';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
"OFFICIAL_MEMPOOL_SPACE": true,
|
||||
"TESTNET_ENABLED": true,
|
||||
"TESTNET4_ENABLED": true,
|
||||
"LIQUID_ENABLED": true,
|
||||
"LIQUID_TESTNET_ENABLED": true,
|
||||
"LIQUID_ENABLED": false,
|
||||
"LIQUID_TESTNET_ENABLED": false,
|
||||
"BISQ_ENABLED": true,
|
||||
"BISQ_SEPARATE_BACKEND": true,
|
||||
"SIGNET_ENABLED": true,
|
||||
|
|
Loading…
Add table
Reference in a new issue