AccountData: decouple query from constructor

the ndb query must be as close to the subscription as possible to
avoid events falling through the cracks

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-07-08 15:09:03 -04:00
parent 6c951d1a29
commit c99b99ed52
6 changed files with 60 additions and 52 deletions

View File

@@ -78,9 +78,11 @@ impl SwitchingAction {
match &self {
SwitchingAction::Accounts(account_action) => match account_action {
AccountsAction::Switch(switch_action) => {
let txn = Transaction::new(ctx.ndb).expect("txn");
ctx.accounts.select_account(
&switch_action.switch_to,
ctx.ndb,
&txn,
ctx.pool,
ui_ctx,
);