-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[No QA] Remove unused parameter for short lived authToken #52501
Conversation
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
src/libs/actions/Session/index.ts
Outdated
@@ -570,12 +570,7 @@ function beginGoogleSignIn(token: string | null) { | |||
*/ | |||
function signInWithShortLivedAuthToken(email: string, authToken: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function signInWithShortLivedAuthToken(email: string, authToken: string) { | |
function signInWithShortLivedAuthToken(authToken: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing that out. Removing this param resulted in a little bit more cleanup.
@rafecolton Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
🎯 @DylanDylann, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #52528. |
@thienlnam Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
We got some eslint failures |
ahh, we need to migrate to useOnyx in some changed files cc @tgolen |
OK, I'm not sure if I will get to this today or not, but I'll get it updated! |
OK, looks like it's all set now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 5 changed files in this pull request and generated no suggestions.
const {initialURL} = useContext(InitialURLContext); | ||
const [session] = useOnyx(ONYXKEYS.SESSION); | ||
const [account = {}] = useOnyx(ONYXKEYS.ACCOUNT); | ||
const isAccountLoading = account?.isLoading; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does isLoading
need to be null coalesced or defaulted in line 25?
|
||
function SAMLSignInPage({credentials, account}: SAMLSignInPageProps) { | ||
function SAMLSignInPage() { | ||
const [account] = useOnyx(ONYXKEYS.ACCOUNT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a default for isLoading
or a null coalesce below? Why did you do [account = {}]
above and [account]
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we don't need that (explained in my other comment). The default object was just some copy/paste from other code that I will remove.
src/pages/LogOutPreviousUserPage.tsx
Outdated
const [account = {}] = useOnyx(ONYXKEYS.ACCOUNT); | ||
const isAccountLoading = account?.isLoading; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, agree we should make it as before. Wdyt about this suggestion?
const [account = {}] = useOnyx(ONYXKEYS.ACCOUNT); | |
const isAccountLoading = account?.isLoading; | |
const [account] = useOnyx(ONYXKEYS.ACCOUNT); | |
const isAccountLoading = account?.isLoading ?? false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can remove the default value for account, but it doesn't need null coalesce because the logic is only doing a falsy check, so undefined
would be treated the same as false
anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated!
src/pages/LogOutPreviousUserPage.tsx
Outdated
const [account = {}] = useOnyx(ONYXKEYS.ACCOUNT); | ||
const isAccountLoading = account?.isLoading; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can remove the default value for account, but it doesn't need null coalesce because the logic is only doing a falsy check, so undefined
would be treated the same as false
anyway.
|
||
function SAMLSignInPage({credentials, account}: SAMLSignInPageProps) { | ||
function SAMLSignInPage() { | ||
const [account] = useOnyx(ONYXKEYS.ACCOUNT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we don't need that (explained in my other comment). The default object was just some copy/paste from other code that I will remove.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Performance Comparison Report 📊Significant Changes To Duration
Show details
Meaningless Changes To DurationShow entries
Show details
|
@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker. |
🚀 Deployed to staging by https://github.com/rafecolton in version: 9.0.64-0 🚀
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 9.0.64-4 🚀
|
cc @iwiznia @jasperhuangg
Explanation of Change
This param was removed because we stopped deleting these logins on the server.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/443960
Tests
None, since this is already being tested with https://github.com/Expensify/Web-Expensify/pull/44408 and removing the param does not change any functionality
Offline tests
None
QA Steps
None, since this is already being tested with https://github.com/Expensify/Web-Expensify/pull/44408 and removing the param does not change any functionality
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop