mirror of
https://github.com/mempool/mempool.git
synced 2025-01-09 06:59:42 +01:00
0753b11840
fixes #59
22 lines
715 B
TypeScript
22 lines
715 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import { HttpClient } from '@angular/common/http';
|
|
import { Observable } from 'rxjs';
|
|
import { shareReplay } from 'rxjs/operators';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class AssetsService {
|
|
getAssetsJson$: Observable<any>;
|
|
getAssetsMinimalJson$: Observable<any>;
|
|
getMiningPools$: Observable<any>;
|
|
|
|
constructor(
|
|
private httpClient: HttpClient,
|
|
) {
|
|
this.getAssetsJson$ = this.httpClient.get('/resources/assets.json').pipe(shareReplay());
|
|
this.getAssetsMinimalJson$ = this.httpClient.get('/resources/assets.minimal.json').pipe(shareReplay());
|
|
this.getMiningPools$ = this.httpClient.get('/resources/pools.json').pipe(shareReplay());
|
|
}
|
|
}
|