Fix/transaction idempotency#92
Open
Muyideen-js wants to merge 2 commits into
Open
Conversation
Add idempotency service with UUID key generation and XDR hash dedup. transactionsService.submit now auto-generates an idempotency key, hashes the signed XDR, checks localStorage for duplicates before calling the API, and stores records with 24h TTL on success. Includes idempotency_key field in the API request body.
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 #26
Summary
Closes #[issue number]
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.
src/lucide-reactservices/layer)Type of change
Testing
npm run build— 0 errorsnpm run lint— 0 errorsnpm test— 36 tests passed, 0 failuresContext files reviewed
context/architecture-context.mdcontext/code-standards.mdcontext/progress-tracker.mdupdatedWhat changed
src/pages/SponsorOnboarding.tsx— Replaced theStepDepositstub (lines 267–316) with a real deposit flow:$10minimum validation, inline error messaging (aria-invalid,role="alert")sponsorsService.deposit(amount)returnsUnsignedTransaction<DepositPreview>useTransactionhook which calls@stellar/freighter-api'ssignTransactiontransactionsService.submit(signedXdr, 'deposit')posts toPOST /transactions/submitonCompletefires after deposit success → setsonboardingComplete: true→ navigates to/sponsorsAll patterns mirror the existing deposit flow in
src/pages/Sponsors.tsx—useTransaction,useToast,invalidatesubtree.pool, and the success card layout.Acceptance criteria met
Files changed
src/pages/SponsorOnboarding.tsxStepDepositstub with full deposit flow (+ 5 new imports)