feat(payments): [6/10] add a Payments demo mode behind payments-demo-mode - #2171
Open
arseniy-nikitochkin wants to merge 35 commits into
Open
arseniy-nikitochkin wants to merge 35 commits into
arseniy-nikitochkin wants to merge 35 commits into
Conversation
…d identity check Adds the Demo switch: Payments answers from fixtures and replays the session's changes, every ramp provider completes through a stand-in checkout, amounts are prefilled, and BVNK's identity check can be simulated. Only on NEW DESIGN. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…edesign-5-demo # Conflicts: # apps/sdp-web/src/components/dashboard-shell.tsx
… flag Demo mode gets a flag of its own, payments-demo-mode (SDP_FLAG_PAYMENTS_DEMO_MODE, on by default outside production). It counts only while NEW DESIGN is on, and demo data is served only to Payments pages on the new design: a page whose design module is off shows neither demo data nor the switch. The server judges each request by its page's design module. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Contributor
|
The demo switch server action now requires a signed-in organization and the demo flag before writing cookies. Demo session decoding is bounded (encoded length and a 64 KiB inflate cap). Ramps never run an asset the demo wallets lack: the pickers drop those pairs and the demo quotes refuse them instead of crediting USDC. Simulate deposit is offered only on sandbox or demo deposits, and the demo simulates Mural in any currency. Demo payment requests no longer hand out /pay links the public page cannot open. The demo switch copy no longer claims nothing leaves the browser, the flag metadata gets reasoned i18n exemptions, the deprecated zod passthrough is gone, and OfframpStepContent, OfframpRail and useOnrampWizard shed the complexity this PR added. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The demo modules this PR adds pulled sdp-web's global branch coverage to 61.53%, under the 62% gate that failed "Unit Tests (packages)". The handler tests walk every refusal the SDP API would send, each provider's quote shape and BVNK's onboarding; the session tests pin the decode budgets. Trimming an oversized log now cuts in proportion instead of deflating once per dropped action. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…edesign-5-demo # Conflicts: # apps/sdp-web/src/app/dashboard/payments/ramps/components/offramp-step-content.redesign.tsx # apps/sdp-web/src/app/dashboard/payments/ramps/components/onramp-step-content.redesign.tsx # apps/sdp-web/src/app/dashboard/payments/requests/payment-request-create-workspace.tsx # apps/sdp-web/src/app/dashboard/payments/requests/payment-requests-workspace.redesign.tsx # apps/sdp-web/src/i18n/ui-copy-exemptions.json
This comment has been minimized.
This comment has been minimized.
…rivations into helpers The subject key, corridor identity, corridor-scoped record reads, poll key, current onboarding answer, pending agreements, consent check and block reason move out of useCounterpartyRequirements into named module functions. The hook drops below React Doctor's complexity limit; what it returns is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…edesign-5-demo Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> # Conflicts: # apps/sdp-web/src/app/dashboard/payments/requests/payment-requests-workspace.redesign.tsx
…edesign-5-demo Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…edesign-5-demo Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> # Conflicts: # apps/sdp-web/src/app/dashboard/payments/payments-workspace.data.ts # apps/sdp-web/src/app/dashboard/payments/ramps/hooks/use-onramp-wizard.redesign.ts
…edesign-5-demo Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
arseniy-nikitochkin
added this pull request to stack #2185
October 2, 2026 09:02
…edesign-5-demo Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…edesign-5-demo Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…edesign-5-demo Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…edesign-5-demo Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…edesign-5-demo Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…edesign-5-demo Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…edesign-5-demo Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…edesign-5-demo Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…edesign-5-demo Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch was successfully deployed
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.
5 of 7 in the redesign stack. It adds the Demo switch. Payments then answers from fixtures and replays the session's changes, every ramp provider completes through a stand-in checkout, and BVNK's identity check can be simulated.
payments-demo-mode(SDP_FLAG_PAYMENTS_DEMO_MODE, off by default in production). It counts only whilenew-designis on.paymentsDemoResponsefirst (lib/sdp-api.ts). It returns early unless the demo cookie names this project and the page, or the referring page for/api/dashboard/*, is a Payments page on the new design.proxy.tsdrops the demo session cookies on a full page load, so demo changes last one page load.Verification: tsc clean; biome, copy audit and module boundaries pass; 217 test files (1,868 tests) pass.