Skip to content

Fix/495 legal disclaimer integration#2

Open
Whiznificent wants to merge 3 commits into
mainfrom
fix/495-legal-disclaimer-integration
Open

Fix/495 legal disclaimer integration#2
Whiznificent wants to merge 3 commits into
mainfrom
fix/495-legal-disclaimer-integration

Conversation

@Whiznificent
Copy link
Copy Markdown
Owner

fix(KingFRANKHOOD#495): Integrate LegalDisclaimerModal into trade creation and fund deposit flows

Problem
A LegalDisclaimerModal component displaying loss-sharing terms existed in the codebase but was never connected to any user flow. Users could create trades and deposit funds without ever seeing or acknowledging the legal terms — a compliance gap.

What was fixed
Trade Creation (Step3Review.tsx)
Clicking Lock Funds & Create Trade now opens the LegalDisclaimerModal before any transaction is signed or submitted. The modal shows the buyer/seller loss-sharing percentages and the trade value in cNGN. The Stellar transaction only proceeds after the user clicks Accept & Proceed. Clicking Decline returns the user to the review screen with nothing submitted.

Fund Deposit (
page.tsx
)
Clicking the Deposit button now opens the LegalDisclaimerModal before the existing confirmation modal. Loss ratio and trade value are pulled directly from the trade record. Only after accepting does the deposit confirmation flow continue.

UI Barrel (
index.ts
)
Exported LegalDisclaimerModal from the shared UI index so it can be imported cleanly across the app.

CI Fix (Step3Review.test.tsx)
The existing tests expected the loading state to appear immediately on submit click. With the disclaimer gate in place, that flow changed. Updated tests to:

Mock LegalDisclaimerModal with a lightweight stub
Click through Accept & Proceed before asserting loading state
Fix an incorrect assertion (USDC → cNGN) in the authorization message test
Add 3 new tests covering disclaimer show, hide on decline, and no API call on decline

Closes KingFRANKHOOD#495

@Whiznificent Whiznificent force-pushed the fix/495-legal-disclaimer-integration branch from 368997d to e565b28 Compare May 27, 2026 22:14
@Whiznificent Whiznificent force-pushed the fix/495-legal-disclaimer-integration branch from fd02dd5 to 6ab9777 Compare May 28, 2026 13:06
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.

Missing Legal Disclaimer Integration

1 participant