kunickyd преди 3 години
родител
ревизия
d8f117a96f
променени са 1 файла, в които са добавени 5 реда и са изтрити 2 реда
  1. 5 2
      src/app/bc-info/bc-info.component.ts

+ 5 - 2
src/app/bc-info/bc-info.component.ts

@@ -19,7 +19,7 @@ import { BcInfoService } from './bc-info.service';
   selector: 'blockchain-info',
   templateUrl: 'bc-info.component.html',
 })
-export class BcInfoComponent implements HsPanelComponent {
+export class BcInfoComponent implements HsPanelComponent, OnInit {
   private extentIteraction: ExtentIteraction;
 
   choosingArea: boolean = false;
@@ -40,7 +40,10 @@ export class BcInfoComponent implements HsPanelComponent {
     private mapService: HsMapService,
     private hsLayoutService: HsLayoutService
   ) {
-    this.extentIteraction = new ExtentIteraction({ condition: shiftKeyOnly });
+    this.extentIteraction = new ExtentIteraction({ condition: shiftKeyOnly });    
+  }
+  async ngOnInit(): Promise<void> {
+    this.userBalance = await this.bcInfoService.getUserBalance(this.user, this.userPrivateKey, this.assetId);
   }
 
   isVisible(): boolean {