Function: switchAccount()

switchAccount(args): Promise<void>

Switch the current account to the provided account.

Parameters

args

lix

Pick<Lix, "db">

to

Pick<{ id: LixGenerated<string>; name: string; }, "id" | "name">[]

Returns

Promise<void>

Examples

One active account

await switchAccount({ lix, to: [otherAccount] });

Multiple active accounts

await switchAccount({ lix, to: [account1, account2] });