Skip to content

fix: add live cost breakdown to step-3 review summary (Closes #1276) - #1367

Open
waterWang wants to merge 1 commit into
Fluxora-Org:mainfrom
waterWang:fix/create-stream-modal-stale-review-summary
Open

fix: add live cost breakdown to step-3 review summary (Closes #1276)#1367
waterWang wants to merge 1 commit into
Fluxora-Org:mainfrom
waterWang:fix/create-stream-modal-stale-review-summary

Conversation

@waterWang

Copy link
Copy Markdown

Fix: Step-3 review summary now shows live cost breakdown

Problem

When a user reaches step 3, clicks Back to step 2, changes the accrual rate or duration, then advances to step 3 again, the review summary's deposit/cost figures could display stale values — the required deposit (rate × duration) was not visible on the review step at all.

Changes

  1. Added cost breakdown section to step-3 review — shows "Required Deposit" (rate × duration) vs "Your Deposit" (user-entered amount), derived from live form state on every render
  2. Fixed test deps — was missing required mocks for Walletcontext, ToastProvider, i18n, and useModalAccessibility

Screenshots

Before: Step 3 review showed only the deposit amount card, with no visibility into the calculated required deposit.
After: Step 3 review now includes a cost breakdown section showing the required deposit calculation alongside the user's deposit.

Testing

  • ✅ All 4 existing review tests pass
  • ✅ All 10 contrast tests still pass
  • ✅ Cost breakdown recalculates on every render (no memoization)

Add a cost-breakdown section to the CreateStreamModal step-3 review
that shows the required deposit (rate × duration) vs the user's
deposit, derived from live form state on every render (not memoized
against a stale snapshot).

Also fix the review test file which was missing required mocks
(Walletcontext, ToastProvider, i18n, useModalAccessibility).

Closes Fluxora-Org#1276
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.

1 participant