Added fiat balance to address and made fiat balance into a component.

This commit is contained in:
softsimon
2020-03-02 17:29:00 +07:00
parent 29953e12de
commit bab4761c24
11 changed files with 60 additions and 15 deletions

View File

@@ -47,7 +47,7 @@
</tr>
<tr>
<td>Block subsidy</td>
<td>{{ blockSubsidy | number: '1.2-2' }} BTC <span *ngIf="conversions">(<span class="green-color">{{ conversions.USD * blockSubsidy | currency:'USD':'symbol':'1.0-0' }}</span>)</span></td>
<td>{{ blockSubsidy | number: '1.2-2' }} BTC <span *ngIf="conversions">(<app-fiat [value]="blockSubsidy"></app-fiat>)</span></td>
</tr>
<tr>
<td>Status</td>

View File

@@ -22,7 +22,6 @@ export class BlockComponent implements OnInit {
isLoadingTransactions = true;
error: any;
blockSubsidy = 50;
conversions: any;
constructor(
private route: ActivatedRoute,
@@ -69,12 +68,6 @@ export class BlockComponent implements OnInit {
this.stateService.blocks$
.subscribe((block) => this.latestBlock = block);
this.stateService.conversions$
.subscribe((conversions) => {
this.conversions = conversions;
});
}
setBlockSubsidy() {