[HOLD for payment 2021-09-08] [PAY 9/7] Final review modal is showing @expensify.sms for Users with Phone Numbers as their login
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
- Login to newDot
- Request money from an account who has phone number as their login
- Enter amount and Continue
- You will see
@expensify.smsafter the phone number
Expected Result:
Should show only the phone number

Actual Result:


Workaround:
Visual Issue.
Platform:
Where is this issue occurring?
- Web
- iOS
- Android
- Desktop App
- Mobile Web
Version Number: Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation Expensify/Expensify Issue URL:
Triggered auto assignment to @sakluger (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.
Proposal
- To remove the
smsDomainwe need to passalternateText: Str.removeSMSDomain(participant.login)here https://github.com/Expensify/App/blob/ec38ff9574ff9f1ac997b29b871aaf13afc5d57e/src/libs/OptionsListUtils.js#L580
@sakluger Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Thanks for creating this issue @aman-atg! I'm reviewing the issue now.
Triggered auto assignment to @roryabraham (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
This issue is unique and the suggested behavior is in line with what we did in this related issue.
This should be able to be handled by an external contributor.
The su
Triggered auto assignment to @arielgreen (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Putting on hold for a week-ish
Triggered auto assignment to @chiragsalian (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Job posted https://www.upwork.com/jobs/~01b9648852c0022ec5 @chiragsalian will you review @aman-atg 's proposal above? Thx
I just tried this on dev and i don't see @expensify.sms next to the phone number

Also tried it on production and i don't see the issue,

Might be some old issue. @aman-atg can you confirm, if the issue does not exist let's close this GH issue.
@chiragsalian It's still happening for me. It's strange this should happen for any number.
Dev

PROD

Weird, i don't see it for the same number you provided.

Maybe its because you have first and last name loaded. Trying that next,
I created a phone account with test aug17th as the name but i don't see expensify.sms domain.

Trying your account, i also don't see expensify.sms. lol, weird.

I just cleared my cache and retested,

So i'm a little unsure how you are getting the issue. Did you also try on google chrome and did you clear your cache?
@mallenexpensify are you also able to reproduce the issue?
No, unable to reproduce on desktop, Version 1.0.85-9 (production version released today

Did you also try on google chrome and did you clear your cache?
Well, this is a bizarre situation.. I tried with chrome as well and cleared my cache.
Even tried on a different machine.

I think it's only occurring when we request money directly from the chat.
Video for reference.
https://user-images.githubusercontent.com/28243942/129894295-b378d8da-ab50-419c-be81-f2f137c675a2.mp4
If it's still not reproducible then we can maybe close this for now.
I was able to reproduce! Just took a handful of tries.
- open staging.new.expensify.com in chrome.
- go to chat with a user where their account login is a phone number
- click the plus icon next to the compose box (not the big green one)
- enter amount
- observe
expensify.smsat end of username.
I cleared my local storage and signed out/back in and the issue persists.
@chiragsalian can you test the above steps, try to reproduce, and if so... review @aman-atg 's proposal to fix?
Proposal
I propose that we fix the original change that caused this. In newDot we trim the SMS domain from phone numbers while preparing data options for the viewing purpose. Every component follows that. But I see that this https://github.com/Expensify/App/pull/3651 PR added this to fix the issue with IOU Creation but at that time we didn't think of this regression.
- To Keep the app consistent, we remove the logic to add the SMS domain to options from here https://github.com/Expensify/App/blob/ec38ff9574ff9f1ac997b29b871aaf13afc5d57e/src/libs/OptionsListUtils.js#L109.
- Then we fix the https://github.com/Expensify/App/issues/3614 we add the SMS domain while passing the logins to
createIOUTransaction. This is the same pattern we are following in WorkspaceInvitePage.js https://github.com/Expensify/App/blob/2b57f0fac59d007441fb170fd05445d83392ed86/src/libs/actions/Policy.js#L152
Why do this?
As we create the first drop SMS domain while creating options for the listing and then we are re-adding the SMS domain here and again if remove the SMS Domain from here https://github.com/Expensify/App/blob/ec38ff9574ff9f1ac997b29b871aaf13afc5d57e/src/libs/OptionsListUtils.js#L580. It is so confusing to manage. The main source of the data should only be one location OptionsListUtils file. This is the reason we create options for each component from this module only.
https://github.com/Expensify/App/blob/ec38ff9574ff9f1ac997b29b871aaf13afc5d57e/src/libs/OptionsListUtils.js#L191
@chiragsalian, @mallenexpensify it looks like no one is assigned to work on this job. Please double the price or add a comment stating why the job isn't being doubled.
Yup, i can reproduce the issue when i request for money within the chat. Previously i had only tried it via the big green one. Cool, looks like a real issue.
I like @parasharrajat, @mallenexpensify can you hire him on upwork. @parasharrajat, feel free to create the PR.