21 lines
461 B
TypeScript
21 lines
461 B
TypeScript
|
import { Injectable } from '@angular/core';
|
||
|
import { Store } from '@ngxs/store';
|
||
|
|
||
|
import { AccountInfo } from '../states/accounts.state';
|
||
|
|
||
|
|
||
|
@Injectable({
|
||
|
providedIn: 'root'
|
||
|
})
|
||
|
export class ToolsService {
|
||
|
|
||
|
constructor( private readonly store: Store) { }
|
||
|
|
||
|
|
||
|
getSelectedAccounts(): AccountInfo[] {
|
||
|
var regAccounts = <AccountInfo[]>this.store.snapshot().registeredaccounts.accounts;
|
||
|
return regAccounts.filter(x => x.isSelected);
|
||
|
}
|
||
|
|
||
|
}
|