Skip to content
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

Strip dashes from accountPin in porting embed for Verizon portings #20

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Plsr
Copy link

@Plsr Plsr commented Aug 6, 2024

We have recently learned that Verizon will display their users account PINs with dashes (e.g. 123-456) for better readability, but actually requires the PIN to be sent without dashes for port outs.
Naturally, this cause users to copy the PIN in the format provided by Verizon, causing failed portings.

We have adapted Connect to automatically strip dashes from the accountPin field in the porting form for Verizon portings and decided to backport this functionality to our other products as well.


Changes

  • The <CarrierInfoForm /> accepts a new prop (forbiddenPinChars) that defines an array of characters that the component strips from the accountPin field before submitting
  • The <PortingFormContainer /> checks wether the current porting's donorProvider is Verizon and configures <CarrierInfoForm /> to remove dashes from the accountPin if that is the case.

Unrelated Changes

@Plsr Plsr changed the title Strip dashes from porting from accountPin for Verizon portings Strip dashes from accountPin in porting embed for Verizon portings Aug 6, 2024
@Plsr Plsr marked this pull request as ready for review August 6, 2024 06:47
Copy link
Contributor

@dharmadeveloper108 dharmadeveloper108 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thanks!! Just a few tiny minuscule comments 🍓 🍍 🪅

.fn()
.mockImplementation(async () => porting)

;(useUpdatePorting as jest.Mock).mockReturnValue(useUpdatePortingMock)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stray ;? 👀 something weird with the formatting perhaps?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's actually formatted this way by prettier/eslint. I think if we were to drop the semicolon it would be complied as currying

"@tashi-iu/react-native-paper-dates": "^0.18.5",
"jest": "^29.2.1",
"jest-expo": "~50.0.2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would have preferred to make a separate chore PR for this, this way e.g. if for some reason we have to revert the upgrade we don't also lose the PIN changes and vice versa,
but I'm also ok including the upgrade here 💖

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. In this case not updating will break the Expo preview (they dropped support our SDK version completely), so I figured there might be little need to go back a version.

.fn()
.mockImplementation(async () => porting)

;(useUpdatePorting as jest.Mock).mockReturnValue(useUpdatePortingMock)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants