fix: wire StepDeposit onboarding to real deposit XDR flow#91
Open
Muyideen-js wants to merge 3 commits into
Open
fix: wire StepDeposit onboarding to real deposit XDR flow#91Muyideen-js wants to merge 3 commits into
Muyideen-js wants to merge 3 commits into
Conversation
Replace stub StepDeposit component with a functional deposit flow that calls sponsorsService.deposit(), signs via Freighter through useTransaction, and submits via transactionsService.submit(). Adds deposit amount input with $10 minimum validation, error state, and success state with Stellar Expert link.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #56
Summary
Replace the stub
StepDepositcomponent in the sponsor onboarding wizard with a fully functional deposit flow. Sponsors completing the 4-step onboarding can now actually deposit USDC — amount input with $10 minimum validation, unsigned XDR fetched from the API, signed via Freighter, submitted on-chain, and a success state with a Stellar Expert link. On success, onboarding is marked complete and the sponsor is navigated to the dashboard.This repo is for the React web app only
This app targets sponsors, vendors, and mentors.
It does NOT serve learners. Learner features
belong in StepFi-App.
Before submitting, confirm your changes belong here:
contract code
Expo-specific code
(use Tailwind classes or constants/colors.ts)
(use services/ layer only)
Type of change
Testing
Context files reviewed
Mandatory before requesting review
Running these must all exit 0:
What changed
src/pages/SponsorOnboarding.tsx— Replaced theStepDepositstub with a real deposit flow:$10minimum validation and inline error messaging (aria-invalid,role="alert")sponsorsService.deposit(amount)useTransactionhook (which calls@stellar/freighter-api'ssignTransaction)transactionsService.submit(signedXdr, 'deposit')onCompletefires after a successful deposit, settingonboardingComplete: trueand navigating to/sponsorsAll patterns mirror the existing deposit flow in
src/pages/Sponsors.tsxexactly —useTransaction,useToast,invalidatesubtree.pool, and the success card layout.Files changed
src/pages/SponsorOnboarding.tsxStepDepositstub with full deposit flow (+ imports)