@@ -392,6 +427,8 @@
private bool confirmWipe = false;
private bool showConfirmWipeMessage = false;
private string selectedNetwork = "testnet"; // Default to "testnet"
+
+ private string selectedCurrency = "BTC"; // Default to BTC
private SettingsInfo settingsInfo;
@@ -404,10 +441,12 @@
networkType = _networkConfiguration.GetNetwork().Name;
_networkService.OnStatusChanged += UpdateUI;
+
+ selectedCurrency = _clientStorage.GetCurrencyDisplaySetting();
if (!networkType.ToLower().Contains("test"))
selectedNetwork = "mainnet";
-
+
return base.OnInitializedAsync();
}
@@ -650,4 +689,11 @@
NavMenuState.NotifyStateChanged();
}
+
+ private void OnCurrencyChanged(ChangeEventArgs e)
+ {
+ selectedCurrency = e.Value.ToString();
+ _clientStorage.SetCurrencyDisplaySetting(selectedCurrency);
+ StateHasChanged();
+ }
}
\ No newline at end of file
diff --git a/src/Angor/Client/Pages/Wallet.razor b/src/Angor/Client/Pages/Wallet.razor
index 354e7ed4..2f66096f 100644
--- a/src/Angor/Client/Pages/Wallet.razor
+++ b/src/Angor/Client/Pages/Wallet.razor
@@ -1,13 +1,11 @@
@page "/wallet"
-@using Blockcore.NBitcoin
-@using Angor.Shared
-@using Angor.Client.Services
+
+@using System.Text.Json
@using Angor.Client.Storage
+@using Angor.Shared
@using Angor.Shared.Models
-@using Angor.Shared.Services
-@using Angor.Client.Components
+@using Blockcore.NBitcoin
@using Blockcore.Networks
-@using System.Text.Json
@inject HttpClient _httpClient;
@inject IClientStorage storage;
@@ -16,23 +14,22 @@
@inject ILogger
Logger;
@inject IWalletOperations _walletOperations
@inject IClipboardService _clipboardService
+@inject ICurrencyService _currencyService
@inject IDerivationOperations _derivationOperations
@inject NavMenuState NavMenuState
@inject IEncryptionService _encryptionService
@inject IClipboardService ClipboardService
-
-
@inherits BaseComponent
Wallet and balances
-
-
+
+
-
+
@@ -57,13 +54,12 @@
@if (!hasWallet)
{
-
-
+
No Wallet Found
@@ -75,7 +71,7 @@
ShowCreateWalletModal("new"))" role="button">
-
+
Create Wallet
@@ -85,7 +81,7 @@
ShowCreateWalletModal("recover"))" role="button">
-
+
Recover Wallet
@@ -103,7 +99,7 @@
@@ -116,8 +112,6 @@
}
else
{
-
-
@if (isNewWallet)
{