[Part 12] Remove Onyx.connect from LoginUtils#73282
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] |
|
@DylanDylann Last one 🙏 |
| function getSearchValueForPhoneOrEmail(searchTerm: string, countryCode: OnyxEntry<number>) { | ||
| // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
| const parsedPhoneNumber = parsePhoneNumber(appendCountryCodeWithCountryCode(Str.removeSMSDomain(searchTerm), countryCode || CONST.DEFAULT_COUNTRY_CODE)); | ||
| const parsedPhoneNumber = parsePhoneNumber(appendCountryCode(Str.removeSMSDomain(searchTerm), countryCode || CONST.DEFAULT_COUNTRY_CODE)); |
There was a problem hiding this comment.
| const parsedPhoneNumber = parsePhoneNumber(appendCountryCode(Str.removeSMSDomain(searchTerm), countryCode || CONST.DEFAULT_COUNTRY_CODE)); | |
| const parsedPhoneNumber = parsePhoneNumber(appendCountryCode(Str.removeSMSDomain(searchTerm), countryCode)); |
There was a problem hiding this comment.
@kubabutkiewicz Could you please move the default value to the useOnyx definition? I prefer passing countryCode as a number type rather than as an OnyxEntry (this also happens in some other places, please also help resolve)
Reviewer Checklist
Screenshots/VideosScreen.Recording.2025-10-23.at.17.59.54.movAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
@kubabutkiewicz There is a minor comment, the rest looks fine |
… value when missing
…to part-12-onyxdeprecate-loginutils
|
@kubabutkiewicz Could you make the canBeMissing parameter consistent? I think it should be set to false in all places.
|
|
@DylanDylann done |
| * @returns a valid phone number with country code | ||
| */ | ||
| function getPhoneLogin(partnerUserID: string): string { | ||
| function getPhoneLogin(partnerUserID: string, countryCode: number): string { |
There was a problem hiding this comment.
Should we also update the test for this method? As well as the other method which got the new parameter?
There was a problem hiding this comment.
@mountiny We already updated the test. Do you mean we should add more test cases with some other values of countryCode?
There was a problem hiding this comment.
ah yeah those tests are adjusted Vit
mountiny
left a comment
There was a problem hiding this comment.
Apologies, i reviewed on bad internet and it did not load all the files changed 🥲 i can see it now. Thank you!
|
✋ 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 https://github.com/mountiny in version: 9.2.38-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.2.38-5 🚀
|


Explanation of Change
Fixed Issues
$#66333
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop