refactor(ui): remove redundant "Open wallet from file" menu item
The wizard already covers opening existing wallets; a separate file-picker entry in the menu duplicates that flow without adding value. Remove the menu item, its click handler, the OpenFromPath VM method, and the loc key.
This commit is contained in:
@@ -477,41 +477,6 @@ public partial class MainWindowViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public void OpenFromPath(string path)
|
||||
{
|
||||
var newLock = WalletLock.TryAcquire(path);
|
||||
if (newLock is null) { StatusMessage = Loc.Tr("msg.wallet.locked"); return; }
|
||||
|
||||
try
|
||||
{
|
||||
var doc = WalletStore.Load(path);
|
||||
if (IsWalletOpen)
|
||||
CloseWallet();
|
||||
OpenLoaded(doc, WalletLoader.ToAccount(doc), path, password: null, newLock);
|
||||
}
|
||||
catch (WrongPasswordException)
|
||||
{
|
||||
newLock.Dispose();
|
||||
if (IsWalletOpen)
|
||||
CloseWallet();
|
||||
_pendingOpenPath = path;
|
||||
WalletFileExists = true;
|
||||
PasswordInput = "";
|
||||
SetupStep = StepOpen;
|
||||
StatusMessage = "";
|
||||
}
|
||||
catch (UnauthorizedAccessException)
|
||||
{
|
||||
newLock.Dispose();
|
||||
StatusMessage = Loc.Tr("msg.wallet.noaccess");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
newLock.Dispose();
|
||||
StatusMessage = $"Errore: {ex.Message}";
|
||||
}
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void NewWallet()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user