Refactor loading of tokens in token component.
This commit is contained in:
parent
a2ee2ae071
commit
02b98a46ca
@ -29,9 +29,11 @@ export class TokensComponent implements OnInit {
|
|||||||
|
|
||||||
async ngOnInit(): Promise<void> {
|
async ngOnInit(): Promise<void> {
|
||||||
await this.tokenService.init();
|
await this.tokenService.init();
|
||||||
this.tokenService.onload = async (status: boolean): Promise<void> => {
|
this.tokenService.load.subscribe(async (status: boolean) => {
|
||||||
await this.tokenService.getTokens();
|
if (status) {
|
||||||
};
|
await this.tokenService.getTokens();
|
||||||
|
}
|
||||||
|
});
|
||||||
this.tokenService.tokensSubject.subscribe((tokens) => {
|
this.tokenService.tokensSubject.subscribe((tokens) => {
|
||||||
this.loggingService.sendInfoLevelMessage(tokens);
|
this.loggingService.sendInfoLevelMessage(tokens);
|
||||||
this.dataSource = new MatTableDataSource(tokens);
|
this.dataSource = new MatTableDataSource(tokens);
|
||||||
|
Loading…
Reference in New Issue
Block a user