Merge pull request #4814 from mempool/natsoni/hide-featured-assets-testnet
Hide featured assets on Liquid testnet
This commit is contained in:
commit
16f9593d2e
@ -1,5 +1,7 @@
|
||||
<div *ngIf="featuredAssets$ | async as featured; else loading" class="featuredBox">
|
||||
|
||||
<div *ngIf="featured.length === 0" class="text-center">
|
||||
<div i18n="liquid.no-featured.assets" class="symbol">No featured assets</div>
|
||||
</div>
|
||||
<div class="card" *ngFor="let group of featured">
|
||||
<ng-template [ngIf]="group.assets" [ngIfElse]="singleAsset">
|
||||
<a [routerLink]="['/assets/group' | relativeUrl, group.id]">
|
||||
|
@ -47,3 +47,9 @@
|
||||
.ticker {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.symbol {
|
||||
color: grey;
|
||||
font-size: 1.5rem;
|
||||
font-style: italic;
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { ApiService } from '../../../services/api.service';
|
||||
import { StateService } from '../../../services/state.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-assets-featured',
|
||||
@ -12,10 +13,11 @@ export class AssetsFeaturedComponent implements OnInit {
|
||||
|
||||
constructor(
|
||||
private apiService: ApiService,
|
||||
private stateService: StateService,
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.featuredAssets$ = this.apiService.listFeaturedAssets$();
|
||||
this.featuredAssets$ = this.apiService.listFeaturedAssets$(this.stateService.network);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -228,8 +228,9 @@ export class ApiService {
|
||||
return this.httpClient.get<any>(this.apiBaseUrl + this.apiBasePath + '/api/v1/liquid/reserves/utxos/emergency-spent/stats');
|
||||
}
|
||||
|
||||
listFeaturedAssets$(): Observable<any[]> {
|
||||
return this.httpClient.get<any[]>(this.apiBaseUrl + '/api/v1/assets/featured');
|
||||
listFeaturedAssets$(network: string = 'liquid'): Observable<any[]> {
|
||||
if (network === 'liquid') return this.httpClient.get<any[]>(this.apiBaseUrl + '/api/v1/assets/featured');
|
||||
return of([]);
|
||||
}
|
||||
|
||||
getAssetGroup$(id: string): Observable<any> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user