import { ChangeDetectorRef , Component } from '@angular/core' ; import { FormToastService } from '../../../common/services/form-toast.service' ; import { ApiService } from '../../../common/api/api.service' ; import { MindsUser } from '../../../interfaces/entities' ; @ Component ( { selector : 'm-admin__liquidityProvideers' , templateUrl : 'liquidity-providers.component.html' , styleUrls : [ './liquidity-providers.component.ng.scss' ] , } ) export class AdminLiquidityProvidersComponent { users : MindsUser [ ] = [ ] ; inProgress : boolean = false ; constructor ( public api , protected toasterService , protected cd ) { } ngOnInit ( ) { this . load ( ) ; } async load ( ) { this . inProgress = true ; try { this . users = < any > ( ( await this . api . get ( `api/v3/blockchain/liquidity-positions/users` ) . toPromise ( ) ) . users ) ; } catch ( err ) { console . log ( err ) ; } this . inProgress = false ; this . cd . markForCheck ( ) ; this . cd . detectChanges ( ) ; } }