Skip to content

Reusable transfer components - #2

Merged
JW-Rami merged 1 commit into
devfrom
rami/reusable-transfer-ui
Oct 9, 2026
Merged

JW-Rami merged 1 commit into
devfrom
rami/reusable-transfer-ui

Conversation

@JW-Rami

@JW-Rami JW-Rami commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Problem / Context

Planned improvement: the public SDK hooks were copyable, but App mixed orchestration, financial eligibility and all UI. No incident was identified. Integrators need a complete reusable folder for private transfers.

Live demo

Open the main Cloudflare demo - see the interface before copying the integration.

Open the public Cloudflare preview - no authentication required.

Changes

  • App is now a 61-line demo shell. Copy src/invisible/ for the controller, complete widget or individual display modules.
  • Keep one session owner, existing SDK hooks and mutation protection. Headless refund actions require fresh, matching, nonterminal eligibility.
  • Scope styles to the widget and use unique dialog/popover/radio identifiers for multiple instances. Preserve inline destination input and custom payout options.
  • Document interfaces and customization. No new dependencies.
classDiagram
  App --> usePrivateTransferController
  App --> PrivateTransferWidget
  usePrivateTransferController --> useInvisibleSession
  usePrivateTransferController --> usePrivateTransfers
  usePrivateTransferController --> useTransferStatus
  PrivateTransferWidget --> TransferForm
  PrivateTransferWidget --> TransferActivity
  PrivateTransferWidget --> PayoutWindowPicker
  TransferForm --> TransferReview
  TransferReview --> Dialog
  TransferActivity --> TransferDetails
Loading

Validation

  • 30 tests passed; TypeScript and production build passed; dependency audit found zero vulnerabilities.
  • Copied the folder into an independent production-built host: two widgets keep separate input/selection/IDs; host styles remain intact. Brave desktop/mobile and keyboard checks passed, including native review focus, Escape and local confirmation.
  • Mocked SDK checks cover uncertain refund/reconnect protection, terminal states and unrelated snapshots; existing exact payout payload and mutation tests remain green.
  • Live coordinator connection currently reports WS_HANDSHAKE_FAILED. No funded transfer or settlement was verified.

@JW-Rami JW-Rami added the UI Visible interface and layout label Oct 8, 2026
@JW-Rami JW-Rami self-assigned this Oct 8, 2026
@JW-Rami
JW-Rami merged commit beb13ee into dev Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI Visible interface and layout

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant