Add type to token service load subject.
This commit is contained in:
parent
71fc96bfe1
commit
9439e25370
@ -201,11 +201,13 @@ export class UserService {
|
||||
const account: Syncable = Envelope.fromJSON(JSON.stringify(res)).unwrap();
|
||||
const accountInfo = account.m.data;
|
||||
await personValidation(accountInfo);
|
||||
this.tokenService.onload = async (status: boolean): Promise<void> => {
|
||||
accountInfo.balance = await this.tokenService.getTokenBalance(
|
||||
accountInfo.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0]
|
||||
);
|
||||
};
|
||||
this.tokenService.load.subscribe(async (status: boolean) => {
|
||||
if (status) {
|
||||
accountInfo.balance = await this.tokenService.getTokenBalance(
|
||||
accountInfo.identities.evm[`bloxberg:${environment.bloxbergChainId}`][0]
|
||||
);
|
||||
}
|
||||
});
|
||||
accountInfo.vcard = vCard.parse(atob(accountInfo.vcard));
|
||||
await vcardValidation(accountInfo.vcard);
|
||||
this.addAccount(accountInfo, limit);
|
||||
|
@ -190,7 +190,7 @@ export class AccountDetailsComponent implements OnInit {
|
||||
.getGenders()
|
||||
.pipe(first())
|
||||
.subscribe((res) => (this.genders = res));
|
||||
this.tokenService.load.subscribe(async (status) => {
|
||||
this.tokenService.load.subscribe(async (status: boolean) => {
|
||||
if (status) {
|
||||
this.tokenSymbol = await this.tokenService.getTokenSymbol();
|
||||
}
|
||||
|
@ -29,9 +29,11 @@ export class TokensComponent implements OnInit {
|
||||
|
||||
async ngOnInit(): Promise<void> {
|
||||
await this.tokenService.init();
|
||||
this.tokenService.onload = async (status: boolean): Promise<void> => {
|
||||
await this.tokenService.getTokens();
|
||||
};
|
||||
this.tokenService.load.subscribe(async (status: boolean) => {
|
||||
if (status) {
|
||||
await this.tokenService.getTokens();
|
||||
}
|
||||
});
|
||||
this.tokenService.tokensSubject.subscribe((tokens) => {
|
||||
this.loggingService.sendInfoLevelMessage(tokens);
|
||||
this.dataSource = new MatTableDataSource(tokens);
|
||||
|
@ -48,7 +48,7 @@ export class TransactionDetailsComponent implements OnInit {
|
||||
this.recipientBloxbergLink =
|
||||
'https://blockexplorer.bloxberg.org/address/' + this.transaction?.to + '/transactions';
|
||||
}
|
||||
this.tokenService.load.subscribe(async (status) => {
|
||||
this.tokenService.load.subscribe(async (status: boolean) => {
|
||||
if (status) {
|
||||
this.tokenSymbol = await this.tokenService.getTokenSymbol();
|
||||
this.tokenName = await this.tokenService.getTokenName();
|
||||
|
@ -56,7 +56,7 @@ export class TransactionsComponent implements OnInit, AfterViewInit {
|
||||
.getTransactionTypes()
|
||||
.pipe(first())
|
||||
.subscribe((res) => (this.transactionsTypes = res));
|
||||
this.tokenService.load.subscribe(async (status) => {
|
||||
this.tokenService.load.subscribe(async (status: boolean) => {
|
||||
if (status) {
|
||||
this.tokenSymbol = await this.tokenService.getTokenSymbol();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user