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

Remove custom bank account flow #192

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
225 changes: 0 additions & 225 deletions app/(auth)/bankaccountform/form.tsx

This file was deleted.

24 changes: 0 additions & 24 deletions app/(auth)/bankaccountform/page.tsx

This file was deleted.

15 changes: 1 addition & 14 deletions app/(auth)/onboarding/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,13 @@
import {ConnectAccountOnboarding} from '@stripe/react-connect-js';
import EmbeddedComponentContainer from '@/app/components/EmbeddedComponentContainer';
import React from 'react';
import {useSession} from 'next-auth/react';

export default function Onboarding() {
const {data: session} = useSession();
const stripeAccount = session?.user.stripeAccount;

const isCustom =
stripeAccount?.controller?.stripe_dashboard?.type === 'none' &&
stripeAccount?.controller?.losses?.payments === 'application' &&
stripeAccount?.controller?.requirement_collection === 'application';

return (
<EmbeddedComponentContainer componentName="AccountOnboarding">
<ConnectAccountOnboarding
onExit={() => {
if (isCustom) {
window.location.href = '/bankaccountform';
} else {
window.location.href = '/home?shownux=true';
}
window.location.href = '/home?shownux=true';
}}
/>
</EmbeddedComponentContainer>
Expand Down
16 changes: 11 additions & 5 deletions app/api/account_session/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export async function POST(req: NextRequest) {
enabled: true,
features: {
money_movement: true,
external_account_collection: !isCustom,
disable_stripe_user_authentication: isCustom,
},
},
financial_account_transactions: {
Expand All @@ -105,24 +105,30 @@ export async function POST(req: NextRequest) {
instant_payouts: true,
standard_payouts: true,
edit_payout_schedule: true,
external_account_collection: !isCustom,
disable_stripe_user_authentication: isCustom,
},
},
// Connect
account_management: {
enabled: true,
features: {external_account_collection: !isCustom},
features: {
disable_stripe_user_authentication: isCustom,
},
},
account_onboarding: {
enabled: true,
features: {external_account_collection: !isCustom},
features: {
disable_stripe_user_authentication: isCustom,
},
},
// @ts-ignore
payment_method_settings: {enabled: true},
documents: {enabled: true},
notification_banner: {
enabled: true,
features: {external_account_collection: !isCustom},
features: {
disable_stripe_user_authentication: isCustom,
},
},
capital_overview: {
enabled: true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"react-dom": "^18",
"react-hook-form": "^7.51.1",
"sharp": "^0.33.4",
"stripe": "^15.12.0-beta.1",
"stripe": "^17.3.0-beta.1",
"tailwind-merge": "^2.2.2",
"tailwindcss-animate": "^1.0.7",
"yarn": "^1.22.22",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4573,10 +4573,10 @@ strip-json-comments@^3.1.1:
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==

stripe@^15.12.0-beta.1:
version "15.12.0"
resolved "https://registry.yarnpkg.com/stripe/-/stripe-15.12.0.tgz#a30c242861f9c97dd31d3078fb0673d9bd10efe2"
integrity sha512-slTbYS1WhRJXVB8YXU8fgHizkUrM9KJyrw4Dd8pLEwzKHYyQTIE46EePC2MVbSDZdE24o1GdNtzmJV4PrPpmJA==
stripe@^17.3.0-beta.1:
version "17.3.0-beta.1"
resolved "https://registry.yarnpkg.com/stripe/-/stripe-17.3.0-beta.1.tgz#4d7a3843e8e272f66973ed26de72b30b06946cfa"
integrity sha512-qi/ChW82ElFIe9Tz7mdPI+rx8neHmYoBGODeJ0QNfP9hdyx7F06nBjxriCWO9Y3poL+XQ8WXGOPjyhRgWVa34A==
dependencies:
"@types/node" ">=8.1.0"
qs "^6.11.0"
Expand Down
Loading