Fixes.
This commit is contained in:
parent
959e2b55cb
commit
24182a6fb3
@ -18,15 +18,15 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Total received</td>
|
<td>Total received</td>
|
||||||
<td><app-amount [satoshis]="receieved"></app-amount></td>
|
<td><app-amount [satoshis]="receieved" [noFiat]="true"></app-amount></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Total sent</td>
|
<td>Total sent</td>
|
||||||
<td><app-amount [satoshis]="sent"></app-amount></td>
|
<td><app-amount [satoshis]="sent" [noFiat]="true"></app-amount></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Balance</td>
|
<td>Balance</td>
|
||||||
<td><app-amount [satoshis]="receieved - sent"></app-amount> (<app-fiat [value]="receieved - sent"></app-fiat>)</td>
|
<td><app-amount [satoshis]="receieved - sent" [noFiat]="true"></app-amount> (<app-fiat [value]="receieved - sent"></app-fiat>)</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Total fees</td>
|
<td>Total fees</td>
|
||||||
<td><app-amount [satoshis]="mempoolBlock.totalFees" [digitsInfo]="'1.2-2'"></app-amount> (<app-fiat [value]="mempoolBlock.totalFees" digitsInfo="1.0-0"></app-fiat>)</td>
|
<td><app-amount [satoshis]="mempoolBlock.totalFees" [digitsInfo]="'1.2-2'" [noFiat]="true"></app-amount> (<app-fiat [value]="mempoolBlock.totalFees" digitsInfo="1.0-0"></app-fiat>)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Transactions</td>
|
<td>Transactions</td>
|
||||||
|
@ -31,6 +31,12 @@ export class MempoolBlockComponent implements OnInit, OnDestroy {
|
|||||||
this.mempoolBlockIndex = parseInt(params.get('id'), 10) || 0;
|
this.mempoolBlockIndex = parseInt(params.get('id'), 10) || 0;
|
||||||
return this.stateService.mempoolBlocks$
|
return this.stateService.mempoolBlocks$
|
||||||
.pipe(
|
.pipe(
|
||||||
|
map((blocks) => {
|
||||||
|
if (!blocks.length) {
|
||||||
|
return [{ index: 0, blockSize: 0, blockVSize: 0, feeRange: [0, 0], medianFee: 0, nTx: 0, totalFees: 0 }];
|
||||||
|
}
|
||||||
|
return blocks;
|
||||||
|
}),
|
||||||
filter((mempoolBlocks) => mempoolBlocks.length > 0),
|
filter((mempoolBlocks) => mempoolBlocks.length > 0),
|
||||||
map((mempoolBlocks) => {
|
map((mempoolBlocks) => {
|
||||||
while (!mempoolBlocks[this.mempoolBlockIndex]) {
|
while (!mempoolBlocks[this.mempoolBlockIndex]) {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Component, OnInit, OnDestroy, HostListener } from '@angular/core';
|
import { Component, OnInit, OnDestroy, HostListener } from '@angular/core';
|
||||||
import { Subscription } from 'rxjs';
|
import { Subscription, pipe } from 'rxjs';
|
||||||
import { MempoolBlock } from 'src/app/interfaces/websocket.interface';
|
import { MempoolBlock } from 'src/app/interfaces/websocket.interface';
|
||||||
import { StateService } from 'src/app/services/state.service';
|
import { StateService } from 'src/app/services/state.service';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { take } from 'rxjs/operators';
|
import { take, map } from 'rxjs/operators';
|
||||||
import { feeLevels, mempoolFeeColors } from 'src/app/app.constants';
|
import { feeLevels, mempoolFeeColors } from 'src/app/app.constants';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -42,6 +42,14 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy {
|
|||||||
this.stateService.isTabHidden$.subscribe((tabHidden) => this.tabHidden = tabHidden);
|
this.stateService.isTabHidden$.subscribe((tabHidden) => this.tabHidden = tabHidden);
|
||||||
|
|
||||||
this.mempoolBlocksSubscription = this.stateService.mempoolBlocks$
|
this.mempoolBlocksSubscription = this.stateService.mempoolBlocks$
|
||||||
|
.pipe(
|
||||||
|
map((blocks) => {
|
||||||
|
if (!blocks.length) {
|
||||||
|
return [{ index: 0, blockSize: 0, blockVSize: 0, feeRange: [0, 0], medianFee: 0, nTx: 0, totalFees: 0 }];
|
||||||
|
}
|
||||||
|
return blocks;
|
||||||
|
}),
|
||||||
|
)
|
||||||
.subscribe((blocks) => {
|
.subscribe((blocks) => {
|
||||||
blocks.forEach((block, i) => {
|
blocks.forEach((block, i) => {
|
||||||
block.index = this.blockIndex + i;
|
block.index = this.blockIndex + i;
|
||||||
|
@ -25,14 +25,7 @@ export class StateService {
|
|||||||
conversions$ = new ReplaySubject<any>(1);
|
conversions$ = new ReplaySubject<any>(1);
|
||||||
bsqPrice$ = new ReplaySubject<number>(1);
|
bsqPrice$ = new ReplaySubject<number>(1);
|
||||||
mempoolStats$ = new ReplaySubject<MemPoolState>(1);
|
mempoolStats$ = new ReplaySubject<MemPoolState>(1);
|
||||||
mempoolBlocks$ = new ReplaySubject<MempoolBlock[]>(1).pipe(
|
mempoolBlocks$ = new ReplaySubject<MempoolBlock[]>(1);
|
||||||
map((blocks) => {
|
|
||||||
if (!blocks.length) {
|
|
||||||
return [{ blockSize: 0, blockVSize: 0, feeRange: [0, 0], medianFee: 0, nTx: 0, totalFees: 0 }];
|
|
||||||
}
|
|
||||||
return blocks;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
txReplaced$ = new Subject<Transaction>();
|
txReplaced$ = new Subject<Transaction>();
|
||||||
mempoolTransactions$ = new Subject<Transaction>();
|
mempoolTransactions$ = new Subject<Transaction>();
|
||||||
blockTransactions$ = new Subject<Transaction>();
|
blockTransactions$ = new Subject<Transaction>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user