Open History to see the last commit
1import { Atom } from "effect/reactivity";
2
3import { appAtomRegistry } from "../../state/atom-registry";
4
5// Holds the account id so a sign-out between the request and the navigation
6// cannot present the sheet for the wrong account.
7export const connectOnboardingRequestAtom = Atom.make<string | null>(null).pipe(
8 Atom.keepAlive,
9 Atom.withLabel("mobile:connect-onboarding-request"),
10);
11
12export function requestConnectOnboarding(accountId: string): void {
13 appAtomRegistry.set(connectOnboardingRequestAtom, accountId);
14}
15
16export function clearConnectOnboardingRequest(): void {
17 appAtomRegistry.set(connectOnboardingRequestAtom, null);
18}