Add OtpDialogService for mobile-friendly OTP authentication dialog
This commit is contained in:
@@ -18,6 +18,7 @@ public partial class Index
|
||||
{
|
||||
[Inject] private UserContract.UserContractClient UserContract { get; set; } = default!;
|
||||
[Inject] private UserAddressContract.UserAddressContractClient UserAddressContract { get; set; } = default!;
|
||||
[Inject] private WalletService WalletService { get; set; } = default!;
|
||||
|
||||
private GetUserResponse _userProfile = new();
|
||||
private UpdateUserRequest _updateUserRequest = new();
|
||||
@@ -46,9 +47,22 @@ public partial class Index
|
||||
{
|
||||
await LoadUserProfile();
|
||||
await LoadAddresses();
|
||||
await LoadWallet();
|
||||
}
|
||||
}
|
||||
|
||||
private string _walletCredit = "-";
|
||||
private string _walletNetwork = "-";
|
||||
private async Task LoadWallet()
|
||||
{
|
||||
var b = await WalletService.GetBalancesAsync();
|
||||
_walletCredit = FormatPrice(b.CreditBalance);
|
||||
_walletNetwork = FormatPrice(b.NetworkBalance);
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private static string FormatPrice(long price) => string.Format("{0:N0} تومان", price);
|
||||
|
||||
private async Task LoadUserProfile()
|
||||
{
|
||||
try
|
||||
@@ -286,4 +300,4 @@ public partial class Index
|
||||
var url = "https://dayadiamond.ir/profile/creditpurchase/?merchantcode=56146364";
|
||||
await JSRuntime.InvokeVoidAsync("open", url, "_blank");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user