Skip to content

Commit

Permalink
Dashboard: Add seed recovery hint
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisreimann committed Feb 26, 2025
1 parent 151f705 commit 9bf8430
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
23 changes: 22 additions & 1 deletion BTCPayApp.UI/Pages/DashboardPage.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@attribute [Route(Routes.Dashboard)]
@using BTCPayApp.Core
@using BTCPayApp.Core.Contracts
@using BTCPayApp.Core.Models
@using BTCPayApp.UI.Features
@using BTCPayApp.UI.Util
@using BTCPayServer.Client
@using BTCPayServer.Client.Models
@using BTCPayServer.Lightning
Expand All @@ -11,6 +12,7 @@
@inject IDispatcher Dispatcher
@inject IState<UIState> UIState
@inject IState<StoreState> StoreState
@inject ConfigProvider ConfigProvider
@inherits Fluxor.Blazor.Web.Components.FluxorComponent

<PageTitle>Dashboard</PageTitle>
Expand Down Expand Up @@ -58,6 +60,17 @@
</NavLink>
</div>
}
@if (!_config!.RecoveryPhraseVerified)
{
<div class="box d-flex gap-2 my-5">
<Icon Symbol="info" class="mt-1" />
<span>
Please take a moment to
<NavLink href="@Routes.WalletSeed">secure your recovery phrase</NavLink>.
This is important to ensure you can to access and restore your wallet.
</span>
</div>
}
@if (PosAppId != null)
{
@if (PosSalesStatsLoading || PosSalesStats is not null)
Expand All @@ -77,8 +90,16 @@
[SupplyParameterFromQuery]
public string? Success { get; set; }

private BTCPayAppConfig? _config;
private string? _successMessage;

protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();

_config = await ConfigProvider.Get<BTCPayAppConfig>(BTCPayAppConfig.Key) ?? new BTCPayAppConfig();
}

protected override void OnParametersSet()
{
if (!string.IsNullOrEmpty(Success))
Expand Down
1 change: 0 additions & 1 deletion BTCPayApp.UI/Pages/Wallet/SeedConfirmationPage.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@attribute [Route(Routes.WalletSeedConfirm)]
@using System.Diagnostics.CodeAnalysis
@using BTCPayApp.Core
@using BTCPayApp.Core.Auth
@using BTCPayApp.Core.Contracts
Expand Down

0 comments on commit 9bf8430

Please sign in to comment.