Skip to main content

set_current_account

Function set_current_account 

Source
pub fn set_current_account(npub: String) -> Result<(), String>
Expand description

Set the currently-active npub for THIS process AND persist it to the <app_data>/active_account marker so the next boot picks the same account.

Every call site asserts user intent (“this account is now active”); the marker write is idempotent and gracefully no-ops when APP_DATA_DIR is not yet configured (e.g. during in-process unit tests).