using FrontOffice.Main.Utilities; using Microsoft.AspNetCore.Components; namespace FrontOffice.Main.Pages.Profile; public partial class Wallet : ComponentBase { [Inject] private WalletService WalletService { get; set; } = default!; private (string Credit, string Network) _balances = ("-", "-"); private List _txs = new(); protected override async Task OnInitializedAsync() { var b = await WalletService.GetBalancesAsync(); _balances = (FormatPrice(b.CreditBalance), FormatPrice(b.NetworkBalance)); _txs = await WalletService.GetTransactionsAsync(); } private static string FormatPrice(long price) => string.Format("{0:N0} تومان", price); }