1234567891011121314151617181920212223242526272829 |
- using System;
- using System.Threading.Tasks;
- using Microsoft.AspNetCore.Components;
- using Microsoft.AspNetCore.Components.Authorization;
- using Microsoft.AspNetCore.Identity;
- using HyperCube.Models;
- namespace HyperCube.Pages
- {
- public partial class Account
- {
- [Inject]
- public AuthenticationStateProvider AuthenticationStateProvider { get; set; }
- [Inject]
- public UserManager<IdentityUser> UserManager { get; set; }
- [Inject]
- AppData AppData { get; set; }
- private AccountModel account = new();
- string myBalance = "";
- protected override async Task OnInitializedAsync()
- {
- account = AppData.CurrentAccount;
- if (Blockchain.GetMain() != null)
- myBalance = await account.GetBalance();
- }
- }
- }
|