move select account logic to own method

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-07-17 20:22:48 -04:00
parent 8263e56f41
commit 0b8a4fdf55

View File

@@ -212,6 +212,18 @@ impl Accounts {
return;
}
self.select_account_internal(pk_to_select, ndb, txn, pool, ctx);
}
/// Have already selected in `AccountCache`, updating other things
fn select_account_internal(
&mut self,
pk_to_select: &Pubkey,
ndb: &mut Ndb,
txn: &Transaction,
pool: &mut RelayPool,
ctx: &egui::Context,
) {
if let Some(key_store) = &self.storage_writer {
if let Err(e) = key_store.select_key(Some(*pk_to_select)) {
tracing::error!("Could not select key {:?}: {e}", pk_to_select);