Skip to content

Commit 3ebf70d

Browse files
authored
Merge pull request #975 from Sidekick-Poe/feature/wealth-clear-fix
Wealth tracker - Fixed clear all data throwing an error when unauthenticated
2 parents b4160a4 + 1f6a703 commit 3ebf70d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Sidekick.Common.Ui/Errors/SidekickErrorBoundary.razor

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
</ErrorContent>
3939
</LoggingErrorBoundary>
4040

41-
@inject ICurrentView CurrentView
42-
4341
@code {
4442

4543
/// <summary>

src/Sidekick.Modules.Wealth/Tabs/WealthTabSelection.razor

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@using Microsoft.EntityFrameworkCore
2+
@using Sidekick.Apis.Poe.Account.Authentication
23
@using Sidekick.Apis.Poe.Account.Stash
34
@using Sidekick.Apis.Poe.Account.Stash.Models
45
@using Sidekick.Common.Ui.Popovers
@@ -75,6 +76,7 @@
7576
@inject IStashService StashService
7677
@inject DbContextOptions<SidekickDbContext> DbContextOptions
7778
@inject WealthProvider WealthProvider
79+
@inject IAuthenticationService AuthenticationService
7880

7981
@code {
8082

@@ -105,6 +107,9 @@
105107

106108
private async Task Refresh()
107109
{
110+
var state = await AuthenticationService.GetCurrentState();
111+
if (state != AuthenticationState.Authenticated) return;
112+
108113
Loading = true;
109114
StateHasChanged();
110115

0 commit comments

Comments
 (0)