-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: Add ACH microdeposits handling #3693
Conversation
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
@@ Coverage Diff @@
## main #3693 +/- ##
==========================================
- Coverage 98.78% 98.75% -0.03%
==========================================
Files 825 828 +3
Lines 14819 14875 +56
Branches 4203 4222 +19
==========================================
+ Hits 14639 14690 +51
- Misses 171 176 +5
Partials 9 9
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
@@ Coverage Diff @@
## main #3693 +/- ##
==========================================
- Coverage 98.78% 98.75% -0.03%
==========================================
Files 825 828 +3
Lines 14819 14875 +56
Branches 4203 4222 +19
==========================================
+ Hits 14639 14690 +51
- Misses 171 176 +5
Partials 9 9
Continue to review full report in Codecov by Sentry.
|
❌ 1 Tests Failed:
View the top 1 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
ab0bc4c
to
c9f5c17
Compare
9a5f94d
to
0df4e54
Compare
Bundle ReportChanges will increase total bundle size by 7.75kB (0.06%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: gazebo-staging-systemAssets Changed:
Files in
Files in
Files in
Files in
view changes for bundle: gazebo-staging-esmAssets Changed:
Files in
Files in
Files in
Files in
|
✅ Deploy preview for gazebo ready!Previews expire after 1 month automatically.
|
src/pages/PlanPage/PlanPage.test.tsx
Outdated
const wrapper = | ||
(initialEntries = '') => | ||
({ children }) => ( | ||
({ children }: { children: React.ReactNode }) => ( |
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.
nit: This should be React.FC
src/pages/PlanPage/PlanPage.tsx
Outdated
@@ -61,6 +75,11 @@ function PlanPage() { | |||
> | |||
<PlanProvider> | |||
<PlanBreadcrumb /> | |||
{unverifiedPaymentMethods?.length ? ( |
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.
maybe .length > 0 rather than the property existing, but this is also falsey for the 0 case I believe.... maybe
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 think as is works, but I'll make it more explicit with the length check so it we don't have to double think
return ( | ||
<> | ||
<Alert variant="warning"> | ||
<Alert.Title>Verify Your New Payment Method</Alert.Title> |
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.
nit: should double check caps on this
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.
That's the title and what @Adal3n3 suggested. I could go either way on that 🤷♀️
@@ -28,7 +28,7 @@ function CurrentOrgPlan() { | |||
owner, | |||
}) | |||
|
|||
const { data: planData } = usePlanData({ | |||
const { data: pageData } = useCurrentOrgPlanPageData({ |
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.
nit: can maybe just use data vs. pageData. Meaning is around the same but can avoid the cast
<InfoMessageStripeCallback /> | ||
<InfoMessageStripeCallback | ||
hasUnverifiedPaymentMethods={ | ||
!!pageData?.billing?.unverifiedPaymentMethods?.length |
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.
nit: can maybe set this to a const at the top as hasUnverifiedPaymentMethods and use that for the awaitingInitialPaymentMethodVerification const
defaultOptions: { queries: { retry: false } }, | ||
}) | ||
|
||
const wrapper = ({ children }: { children: React.ReactNode }) => ( |
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.
nit: React.FC
setup({ | ||
owner: { | ||
plan: { | ||
value: Plans.USERS_INAPP, |
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.
nit: This plan is legacy, maybe we can use Plans.USERS_PR_INAPPY
|
||
const UnverifiedPaymentMethodSchema = z.object({ | ||
paymentMethodId: z.string(), | ||
hostedVerificationUrl: z.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.
this is nullable right?
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.
ah nice good catch! fixed
}).then((res) => { | ||
const parsedRes = CurrentOrgPlanPageDataSchema.safeParse(res?.data) | ||
if (!parsedRes.success) { | ||
return Promise.reject({ |
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.
nit: rejectNetworkError
@@ -0,0 +1,82 @@ | |||
import { useQuery } from '@tanstack/react-queryV5' |
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.
nit: Could we scooch this next to be in the currentOrgPlan directory?
}) | ||
|
||
interface UseUnverifiedPaymentMethodsArgs { | ||
provider: 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.
nit: Provider
Bundle ReportChanges will increase total bundle size by 7.75kB (0.06%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: gazebo-production-esmAssets Changed:
Files in
Files in
Files in
Files in
view changes for bundle: gazebo-production-systemAssets Changed:
Files in
Files in
Files in
Files in
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #3693 +/- ##
==========================================
- Coverage 98.78% 98.75% -0.03%
==========================================
Files 825 828 +3
Lines 14819 14875 +56
Branches 4203 4230 +27
==========================================
+ Hits 14639 14690 +51
- Misses 171 176 +5
Partials 9 9
Continue to review full report in Codecov by Sentry.
|
@ajay-sentry thanks for reviewing! ready for another look! |
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.
lgtm!
Add flows to handle when using ACH with async microdeposits. Changes in this PR cover below flows:
What "here" links to
codecov/engineering-team#2622