-
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
Deep link to add secondary login in OldDot #6319
Conversation
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.
Approved it once, gonna approve it again 😅
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.
A couple of questions, otherwise looks good!
* Subscribes to Expensify Card updates when checking loginList for private domains | ||
*/ | ||
function subscribeToExpensifyCardUpdates() { | ||
const pusherChannelName = `private-user-accountID-${currentUserAccountID}`; |
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.
It looks like we use the same in subscribeToUserEvents
, can we consolidate those somehow? Also, is there a reason we don't need to check if currentUserAccountID
exists in this function?
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.
This is a one-time only subscription that happens when the user clicks the Add work email address
link. Adding it to subscribeToUserEvents
would subscribe users prematurely and unnecessarily.
I didn't add the check because when the user subscribes to this event we should have a currentUserAccountID
. That is different from subscribeToUserEvents
because subscribeToUserEvents
is called upon login and race conditions could cause currentUserAccountID
to be undefined. With that being said, I'll add the check just to be safe.
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.
Sounds good, thanks for the explanation!
// Handle Expensify Card approval flow updates | ||
Pusher.subscribe(pusherChannelName, Pusher.TYPE.EXPENSIFY_CARD_UPDATE, (pushJSON) => { | ||
if (pushJSON.isUsingExpensifyCard) { | ||
Onyx.merge(ONYXKEYS.USER, {isUsingExpensifyCard: pushJSON.isUsingExpensifyCard, isCheckingDomain: null}); |
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.
Why do we set isCheckingDomain
to null instead of 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.
Setting it to null
should delete the key from Onyx. Since this is a one-time only event, I felt like it was better to remove the key than leave it set as false
.
No longer on hold! Self-merging since it was approved. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by @luacmartins in version: 1.1.15-18 🚀
|
…eanUp Deep link to add secondary login in OldDot (cherry picked from commit ceba16f)
…ng-6319 🍒 Cherry pick PR #6319 to staging 🍒
🚀 Cherry-picked to staging by @roryabraham in version: 1.1.16-6 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
We found this issue when retesting this on Android #6457. I don't think this PR is the culprit do so checking it off. Tested this on Android via adding the bank account through web and then logging into that same account in Android. |
@luacmartins @Jag96 Question about the OldDot redirection. This is expected to open this mWeb page right? I ask because OldDot is messy sometimes in mWeb (in this case it looks ok but I wanted to confirm if this was the expected behaviour) |
Hi @isagoico! Yes, that is the expected behavior as of now. Thanks for confirming! |
@luacmartins Hello! This issue was found while executing this PR in iOS #6475 and it's currently failing QA for iOS - It's a different behaviour from what we have in Android. Can you give it a look 🙇♀️ |
🚀 Deployed to production by @roryabraham in version: 1.1.16-10 🚀
|
1 similar comment
🚀 Deployed to production by @roryabraham in version: 1.1.16-10 🚀
|
I am tagging this PR to highlight an issue fixed here. All conditions in ternary expressions or left-hand operands on conditional renders, should be boolean. This PR is one of the PRs that uses conditional render with string operands, hence I am tagging it here for the contributors to check. We've also updated the item in the checklist with this PR to avoid this issue in the future. |
This PR is a copy of #6176. I forgot to add a hold on the previous PR and it was merged before it should have been and we reverted it.
cc @mountiny
Details
Copy changes to
Issue corporate cards
andConnect bank account
page and deep-linking toAdd secondary login
in OldDot.Fixed Issues
https://github.com/Expensify/Expensify/issues/182071 (partial)
Tests
@gmail.com
Settings > Account Details > Add secondary login
with the secondary login modal open.Settings > Select Workspace > Issue corporate cards
.Settings > Account Details > Add secondary login
with the secondary login modal open.QA Steps
Steps above.
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android