-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
difficulty: mediumStandard features across multiple codebase sectionsStandard features across multiple codebase sections
Description
Context
When a user is about to create a payment stream, the summary card shows the stream parameters (recipient, amount, duration) but does not display the estimated transaction fees, minimum balance requirements, or total cost including gas. Users get surprised by the actual cost when the wallet prompts for signing. Providing an upfront cost estimate reduces transaction abandonment and builds trust.
What Success Looks Like
- The PaymentStreamSummary component shows an estimated transaction fee (in XLM) before the user confirms
- The fee estimate is fetched by simulating the transaction without submitting it (using Soroban's
simulateTransaction) - A breakdown is shown: stream amount + estimated network fee + minimum reserve (if applicable)
- If the user's XLM balance is too low to cover fees, a warning is displayed before they attempt the transaction
- The fee estimate updates when stream parameters change (debounced to avoid excessive RPC calls)
Implementation Guidance
apps/web/src/components/modules/payment-stream/PaymentStreamSummary.tsx— where to display the estimateapps/web/src/services/stellar.service.ts— already hassimulateTransactionlogic that returns fee data- Use
server.simulateTransaction()to get the estimated fee without submitting - Debounce the simulation call (300-500ms) so it doesn't fire on every keystroke
- Show a small loading spinner next to the fee while the estimate is being fetched
- Display "~0.0001 XLM" format for the fee — round up for safety
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
difficulty: mediumStandard features across multiple codebase sectionsStandard features across multiple codebase sections