Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion OneGateApp/Pages/DisableBiometricPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,28 @@ namespace NeoOrder.OneGate.Pages;
public partial class DisableBiometricPage : ContentPage
{
readonly ApplicationDbContext dbContext;
readonly WalletAuthorizationService authorizationService;

public DisableBiometricPage(ApplicationDbContext dbContext)
public DisableBiometricPage(ApplicationDbContext dbContext, WalletAuthorizationService authorizationService)
{
Comment on lines 11 to 15
this.dbContext = dbContext;
this.authorizationService = authorizationService;
InitializeComponent();
}

async void OnDisableClicked(object sender, EventArgs e)
{
bool authorized;
try
{
authorized = await authorizationService.RequestAuthorizationAsync(this, Strings.DisableBiometric, Strings.DisableBiometricText);
}
catch (OperationCanceledException)
{
return;
}
if (!authorized) return;

await dbContext.Settings.DeleteAsync("biometric/credential");
GlobalStates.Invalidate<SettingsPage>();
await Shell.Current.GoToAsync("..");
Expand Down