make selected accounts non optional

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-06-25 22:09:55 -04:00
parent 9cacb6bb69
commit 8e92a97a57
16 changed files with 136 additions and 196 deletions

View File

@@ -92,13 +92,11 @@ impl WalletAction {
global_wallet.ui_state.for_local_only = true;
}
WalletAction::Delete => {
if let Some(acc) = accounts.get_selected_account() {
if acc.wallet.is_some() {
accounts.update_current_account(|acc| {
acc.wallet = None;
});
return None;
}
if accounts.get_selected_account().wallet.is_some() {
accounts.update_current_account(|acc| {
acc.wallet = None;
});
return None;
}
global_wallet.wallet = None;