From 3e880b07dd1f483b44445178717574d850287a32 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Mon, 11 Aug 2025 15:24:37 -0500 Subject: [PATCH] Mark completedForDevice prior to creating an account --- src/screens/Signup/state.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/screens/Signup/state.ts b/src/screens/Signup/state.ts index ae0b20f1c5..2a59db0595 100644 --- a/src/screens/Signup/state.ts +++ b/src/screens/Signup/state.ts @@ -308,6 +308,15 @@ export function useSubmitSignup() { dispatch({type: 'setIsLoading', value: true}) try { + /** + * Marks any active policy update as completed, since user just agreed + * to TOS/privacy during sign up. + * + * THIS MUST RUN BEFORE createAccount, which will re-render the whole + * app with the new account. + */ + preemptivelyCompleteActivePolicyUpdate() + await createAccount( { service: state.serviceUrl, @@ -328,12 +337,6 @@ export function useSubmitSignup() { }, ) - /** - * Marks any active policy update as completed, since user just agreed - * to TOS/privacy during sign up - */ - preemptivelyCompleteActivePolicyUpdate() - /* * Must happen last so that if the user has multiple tabs open and * createAccount fails, one tab is not stuck in onboarding — Eric