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

opt-in to baas features #113

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Conversation

stevekaliski-stripe
Copy link
Contributor

@stevekaliski-stripe stevekaliski-stripe commented Apr 21, 2024

Updating the flow to be opt-in to financial features. When the user is in a supportable connect config, render the Finance tab. If the user does not have the required capabilities yet, display a welcome screen the prompts the user to "enable". Clicking requests the capabilities, routes back to /onboarding, and depending on the capability requested, will create an FA.

baas-2.mp4

@stevekaliski-stripe stevekaliski-stripe force-pushed the stevekaliski-baas-opt-in branch 2 times, most recently from 0255fa4 to fc0bc1a Compare April 21, 2024 13:34
}}
onSuccess={async () => {
await navigate('/onboarding');
navigate(0);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This "works" -- the reason for the navigate + refresh is that when i navigate to /onboarding, the updated capability request isn't reflected yet, so when the user submits, they haven't attested to the issuing/treasury ToS. but with the refresh, it forces a reload (and delay?) so it gets picked up.

Copy link
Collaborator

@jorgea-stripe jorgea-stripe left a comment

Choose a reason for hiding this comment

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

Changes LGTM, left a couple of suggestions

capabilities,
onSuccess,
}: RequestCapabilitiesProps) => {
const {mutate} = useRequestCapabilities(capabilities);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: The loading and error state isn't used here (we should display a spinner/loading state and render an error if one occurred)

},
}}
onSuccess={async () => {
await navigate('/onboarding');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
await navigate('/onboarding');
// After requesting the capabilities successfully, we force a full page reload
await navigate('/onboarding');

@stevekaliski-stripe stevekaliski-stripe merged commit b7720ba into master Apr 22, 2024
1 check passed
@stevekaliski-stripe stevekaliski-stripe deleted the stevekaliski-baas-opt-in branch April 22, 2024 16:52
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.

None yet

2 participants