Skip to content

Commit 846f022

Browse files
committed
refactor: rename isRehydration to userClickedRehydration in OAuthService
1 parent d307c81 commit 846f022

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

app/core/OAuthService/OAuthService.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ interface OAuthServiceLocalState {
5151
loginInProgress: boolean;
5252
oauthLoginSuccess: boolean;
5353
oauthLoginError: string | null;
54-
isRehydration?: boolean;
54+
userClickedRehydration?: boolean;
5555
}
5656
export class OAuthService {
5757
public localState: OAuthServiceLocalState;
@@ -158,9 +158,9 @@ export class OAuthService {
158158
(error.code === OAuthErrorType.UserCancelled ||
159159
error.code === OAuthErrorType.UserDismissed);
160160

161-
let isRehydration: 'true' | 'false' | 'unknown' = 'unknown';
162-
if (this.localState.isRehydration !== undefined) {
163-
isRehydration = this.localState.isRehydration ? 'true' : 'false';
161+
let userClickedRehydration: 'true' | 'false' | 'unknown' = 'unknown';
162+
if (this.localState.userClickedRehydration !== undefined) {
163+
userClickedRehydration = this.localState.userClickedRehydration ? 'true' : 'false';
164164
}
165165

166166
MetaMetrics.getInstance().trackEvent(
@@ -169,7 +169,7 @@ export class OAuthService {
169169
)
170170
.addProperties({
171171
account_type: `default_${authConnection}`,
172-
is_rehydration: isRehydration,
172+
is_rehydration: userClickedRehydration,
173173
failure_type: isUserCancelled ? 'user_cancelled' : 'error',
174174
error_category: errorCategory,
175175
})
@@ -179,7 +179,7 @@ export class OAuthService {
179179

180180
handleOAuthLogin = async (
181181
loginHandler: BaseLoginHandler,
182-
isRehydration: boolean,
182+
userClickedRehydration: boolean,
183183
): Promise<HandleOAuthLoginResult> => {
184184
const web3AuthNetwork = this.config.web3AuthNetwork;
185185

@@ -189,7 +189,7 @@ export class OAuthService {
189189
OAuthErrorType.LoginInProgress,
190190
);
191191
}
192-
this.updateLocalState({ isRehydration });
192+
this.updateLocalState({ userClickedRehydration });
193193
this.#dispatchLogin();
194194

195195
try {

0 commit comments

Comments
 (0)