Liquid: Display BTC as L-BTC.
This commit is contained in:
parent
6b96dce478
commit
12546e1096
@ -18,15 +18,15 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Total received</td>
|
<td>Total received</td>
|
||||||
<td>{{ receieved / 100000000 | number: '1.8-8' }} BTC</td>
|
<td>{{ receieved / 100000000 | number: '1.8-8' }} <ng-template [ngIf]="network === 'liquid'">L-</ng-template>BTC</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Total sent</td>
|
<td>Total sent</td>
|
||||||
<td>{{ sent / 100000000 | number: '1.8-8' }} BTC</td>
|
<td>{{ sent / 100000000 | number: '1.8-8' }} <ng-template [ngIf]="network === 'liquid'">L-</ng-template>BTC</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Balance</td>
|
<td>Balance</td>
|
||||||
<td>{{ (receieved - sent) / 100000000 | number: '1.8-8' }} BTC (<app-fiat [value]="receieved - sent"></app-fiat>)</td>
|
<td>{{ (receieved - sent) / 100000000 | number: '1.8-8' }} <ng-template [ngIf]="network === 'liquid'">L-</ng-template>BTC (<app-fiat [value]="receieved - sent"></app-fiat>)</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -9,6 +9,7 @@ import { AudioService } from 'src/app/services/audio.service';
|
|||||||
import { ApiService } from 'src/app/services/api.service';
|
import { ApiService } from 'src/app/services/api.service';
|
||||||
import { of, merge } from 'rxjs';
|
import { of, merge } from 'rxjs';
|
||||||
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-address',
|
selector: 'app-address',
|
||||||
@ -16,6 +17,8 @@ import { SeoService } from 'src/app/services/seo.service';
|
|||||||
styleUrls: ['./address.component.scss']
|
styleUrls: ['./address.component.scss']
|
||||||
})
|
})
|
||||||
export class AddressComponent implements OnInit, OnDestroy {
|
export class AddressComponent implements OnInit, OnDestroy {
|
||||||
|
network = environment.network;
|
||||||
|
|
||||||
address: Address;
|
address: Address;
|
||||||
addressString: string;
|
addressString: string;
|
||||||
isLoadingAddress = true;
|
isLoadingAddress = true;
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
Confidential
|
Confidential
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template #default>
|
<ng-template #default>
|
||||||
{{ satoshis / 100000000 | number : '1.8-8' }} BTC
|
{{ satoshis / 100000000 | number : '1.8-8' }} <ng-template [ngIf]="network === 'liquid'">L-</ng-template>BTC
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
@ -49,12 +49,12 @@
|
|||||||
<ng-template [ngIf]="fees !== undefined" [ngIfElse]="loadingFees">
|
<ng-template [ngIf]="fees !== undefined" [ngIfElse]="loadingFees">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Total fees</td>
|
<td>Total fees</td>
|
||||||
<td><span title="{{ fees | number: '1.2-8' }} BTC">{{ fees | number: '1.2-2' }} BTC</span> (<app-fiat [value]="fees * 100000000" digitsInfo="1.0-0"></app-fiat>)</td>
|
<td><span title="{{ fees | number: '1.2-8' }} BTC">{{ fees | number: '1.2-2' }} <ng-template [ngIf]="network === 'liquid'">L-</ng-template>BTC</span> (<app-fiat [value]="fees * 100000000" digitsInfo="1.0-0"></app-fiat>)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Reward + fees:</td>
|
<td>Reward + fees:</td>
|
||||||
<td>
|
<td>
|
||||||
<span title="{{ blockSubsidy + fees | number: '1.2-8' }} BTC">{{ blockSubsidy + fees | number: '1.2-2' }} BTC</span> (<app-fiat [value]="(blockSubsidy + fees) * 100000000" digitsInfo="1.0-0"></app-fiat>)
|
<span title="{{ blockSubsidy + fees | number: '1.2-8' }} BTC">{{ blockSubsidy + fees | number: '1.2-2' }} <ng-template [ngIf]="network === 'liquid'">L-</ng-template>BTC</span> (<app-fiat [value]="(blockSubsidy + fees) * 100000000" digitsInfo="1.0-0"></app-fiat>)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
@ -6,6 +6,7 @@ import { Block, Transaction, Vout } from '../../interfaces/electrs.interface';
|
|||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import { StateService } from '../../services/state.service';
|
import { StateService } from '../../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-block',
|
selector: 'app-block',
|
||||||
@ -13,6 +14,7 @@ import { SeoService } from 'src/app/services/seo.service';
|
|||||||
styleUrls: ['./block.component.scss']
|
styleUrls: ['./block.component.scss']
|
||||||
})
|
})
|
||||||
export class BlockComponent implements OnInit, OnDestroy {
|
export class BlockComponent implements OnInit, OnDestroy {
|
||||||
|
network = environment.network;
|
||||||
block: Block;
|
block: Block;
|
||||||
blockHeight: number;
|
blockHeight: number;
|
||||||
blockHash: string;
|
blockHash: string;
|
||||||
@ -97,6 +99,10 @@ export class BlockComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setBlockSubsidy() {
|
setBlockSubsidy() {
|
||||||
|
if (this.network === 'liquid') {
|
||||||
|
this.blockSubsidy = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.blockSubsidy = 50;
|
this.blockSubsidy = 50;
|
||||||
let halvenings = Math.floor(this.block.height / 210000);
|
let halvenings = Math.floor(this.block.height / 210000);
|
||||||
while (halvenings > 0) {
|
while (halvenings > 0) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Total fees</td>
|
<td>Total fees</td>
|
||||||
<td>{{ mempoolBlock.totalFees / 100000000 | number : '1.2-2' }} BTC (<app-fiat [value]="mempoolBlock.totalFees" digitsInfo="1.0-0"></app-fiat>)</td>
|
<td>{{ mempoolBlock.totalFees / 100000000 | number : '1.2-2' }} <ng-template [ngIf]="network === 'liquid'">L-</ng-template>BTC (<app-fiat [value]="mempoolBlock.totalFees" digitsInfo="1.0-0"></app-fiat>)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Transactions</td>
|
<td>Transactions</td>
|
||||||
|
@ -5,6 +5,7 @@ import { switchMap, map, tap } from 'rxjs/operators';
|
|||||||
import { MempoolBlock } from 'src/app/interfaces/websocket.interface';
|
import { MempoolBlock } from 'src/app/interfaces/websocket.interface';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
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-mempool-block',
|
selector: 'app-mempool-block',
|
||||||
@ -12,6 +13,7 @@ import { SeoService } from 'src/app/services/seo.service';
|
|||||||
styleUrls: ['./mempool-block.component.scss']
|
styleUrls: ['./mempool-block.component.scss']
|
||||||
})
|
})
|
||||||
export class MempoolBlockComponent implements OnInit, OnDestroy {
|
export class MempoolBlockComponent implements OnInit, OnDestroy {
|
||||||
|
network = environment.network;
|
||||||
mempoolBlockIndex: number;
|
mempoolBlockIndex: number;
|
||||||
mempoolBlock$: Observable<MempoolBlock>;
|
mempoolBlock$: Observable<MempoolBlock>;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user