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