From 40b514fe11010b160d0ad6ba59cf263e0e4d9867 Mon Sep 17 00:00:00 2001 From: tienifr Date: Tue, 6 Feb 2024 23:37:27 +0700 Subject: [PATCH] fix: incomplete referral link --- src/libs/actions/User.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/libs/actions/User.ts b/src/libs/actions/User.ts index 09cc6e49e6cc..5007fa96fa10 100644 --- a/src/libs/actions/User.ts +++ b/src/libs/actions/User.ts @@ -678,6 +678,13 @@ function generateStatementPDF(period: string) { function setContactMethodAsDefault(newDefaultContactMethod: string) { const oldDefaultContactMethod = currentEmail; const optimisticData: OnyxUpdate[] = [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.ACCOUNT, + value: { + primaryLogin: newDefaultContactMethod, + }, + }, { onyxMethod: Onyx.METHOD.MERGE, key: ONYXKEYS.SESSION, @@ -724,6 +731,13 @@ function setContactMethodAsDefault(newDefaultContactMethod: string) { }, ]; const failureData: OnyxUpdate[] = [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.ACCOUNT, + value: { + primaryLogin: oldDefaultContactMethod, + }, + }, { onyxMethod: Onyx.METHOD.MERGE, key: ONYXKEYS.SESSION,