Skip to content

feature: add widget-checkout#676

Draft
tomiiide wants to merge 15 commits intomainfrom
feature/emb-301-mock-core-onramp
Draft

feature: add widget-checkout#676
tomiiide wants to merge 15 commits intomainfrom
feature/emb-301-mock-core-onramp

Conversation

@tomiiide
Copy link
Copy Markdown
Contributor

@tomiiide tomiiide commented Mar 20, 2026

Which Linear task is linked to this PR?

https://linear.app/lifi-linear/issue/EMB-307/architecture-on-ramp-providers-as-optional-peer-dependencies-of-widget
https://linear.app/lifi-linear/issue/EMB-306/architecture-create-widget-checkout-package
https://linear.app/lifi-linear/issue/EMB-301/mock-core-onramp-session-endpoint-for-widget-development

Why was it implemented this way?

Visual showcase (Screenshots or Videos)

If applicable, attach screenshots, GIFs, or videos to showcase the functionality, UI changes, or bug fixes.

Checklist before requesting a review

  • I have performed a self-review and testing of my code.
  • This pull request is focused and addresses a single problem.
  • If this PR modifies the Widget API or adds new features that require documentation, I have updated the documentation in the public-docs repository.

- Proxy Transak onramp flow with session creation
- Resolve on-chain tokens to Transak crypto currencies
- Handle partner auth with automatic token refresh
- Use correct auth headers and endpoints per Transak docs
- Map mainnet chain IDs to testnet equivalents for staging
- Handle native token address matching and add fallback data
- Add SIMULATE_ERROR env var (timeout/auth_error/config_error modes)
- Add USE_REAL_CORE toggle to proxy requests to real Core API
@tomiiide tomiiide self-assigned this Mar 20, 2026
- Checkout package: LifiWidgetCheckout (modal + ref API), router and pages for
  deposit/funding, MUI layout, theme/config providers, exports
- Playground: @lifi/widget-checkout, swap vs checkout mode, preview, persist v3
- Deps: MUI/Emotion, TanStack Router, zustand
- Add CheckoutWidgetRuntime with checkout→WidgetConfig mapping and default wallet providers
- Wire router for select source, enter amount, progress, funding paths, and widget token/tx routes
- Implement SelectDepositTokenList in checkout using re-exported token-list hooks and components
- Expand @lifi/widget public exports for compositors (pages, providers, token UI building blocks)
- Export wallet-management wallet row helpers; pass playground widget props into checkout
- Add root dev:mock-api script; refresh checkout deps and pnpm-lock.yaml
- Add TransakProvider: POST onramp session, iframe widget, useTransak hook
- Add CheckoutConfig.onrampSessionApiUrl; share OnrampSession types
- Lock destination asset in checkout UI (hidden/disabled to-token controls)
- Merge mock Transak catalog with fallbacks (e.g. mainnet stETH)
- Wire playgrounds: env for onramp API URL; default stETH target in widget
- Remove Transak placeholder dialog and optional @transak/transak-sdk peer meta
@tomiiide tomiiide changed the title feature(checkout): mock core api server feature: add widget-checkout Mar 25, 2026
- OnRampProvider + optional Transak/Mesh peers; UI SDK embed for Transak.
- Drop funding-methods routes and picker UI; exchange row is coming-soon.
- Merge checkout en.json into widget languageResources for tags.* and checkout.*.
- Wire layout, source page, funding options, and Transak dialog to useTranslation.
- Transak: typed UI errors, stable English onError, wallet CTA via error code.
- Export deepMerge from @lifi/widget.
- Add walletId to WalletMenuOpenArgs
- Skip wallet-list when walletId is provided; useEffect fallback
  for resilience against stale state
- Checkout TopWalletRows passes walletId for multi-connector cards
- Back button closes modal when opened via walletId
- Wrap CheckoutRouter in error boundary with retry UI
- Sync drawer visibility with controlled `open` prop
- Wire onConnected/onConnecting/onError through wallet rows
- Fix CSS property names in styled components
- Extract ProgressPage strings to i18n
- Log warnings for failed on-ramp adapter loads
Changes:
- Move mock-api/ out of src/ to package root
- Co-locate CheckoutDrawerContext with CheckoutDrawer at src/ root
- Dissolve onramp/ into providers/OnRampProvider/ with nested TransakProvider/ and MeshProvider/
- Move SelectSource components into pages/SelectSourcePage/
- Rename CheckoutWidgetContainer to AppProvider
- Remove redundant Checkout prefix from components
  (Container, Header, Stack, ErrorBoundary).
- Rename CheckoutDrawer to CheckoutModal
  (file, context, types, ref API).
- Collapse barrel re-export files into component files.
Changes:
- Move all checkout source to packages/widget/src/checkout/
- Move mock-api server to packages/widget/mock-api/
- Split checkout types into config, modal, results, and theme files
- Inline CheckoutModalContext into CheckoutModal; rename AppProvider
- Update all imports to relative paths within the widget package
- Merge checkout i18n keys into widget en.json
- Update playground to import checkout from @lifi/widget
Changes:
- Remove CheckoutTheme, CheckoutResult, and FundingMethod types
- Remove checkoutThemeToWidgetTheme and defaultCheckoutWalletProviders utilities
- Replace checkout-specific config fields with a single config?: Partial<WidgetConfig> prop
- Remove provider package dependencies no longer needed by checkout
- Update playground to use the new config prop
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