Skip to content

feat: upgrade LendaSwap SDK to v0.2.25#28

Merged
tiero merged 1 commit into
mainfrom
codex/open-pr-to-upgrade-lendaswap-sdk
May 6, 2026
Merged

feat: upgrade LendaSwap SDK to v0.2.25#28
tiero merged 1 commit into
mainfrom
codex/open-pr-to-upgrade-lendaswap-sdk

Conversation

@tiero

@tiero tiero commented May 6, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Bring the workspace up to date with the LendaSwap SDK v0.2.25 which provides the new generic Arkade/EVM swap APIs, Permit2 coordinator funding calldata, and richer token metadata.
  • Update CLI/web flows and the LendaSwap skill to correctly interoperate with the new SDK shapes and behaviors (token discovery, quote/pairs, funding calldata).

Description

  • Upgrade dependency: bump @lendasat/lendaswap-sdk-pure to ^0.2.25 in cli, skills, and web, and refresh pnpm-lock.yaml.
  • Skill migration: rewrite the LendaSwap skill to use the new SDK generic endpoints (createEvmToArkadeSwapGeneric, createArkadeToEvmSwapGeneric), add token discovery/lookup, normalize amounts and response fields, and adapt status/field mappings and fee calculations.
  • CLI changes: convert human-friendly stablecoin amounts to smallest token units via parseStablecoinAmount (uses SDK toSmallestUnit) before creating swaps and wire the new SDK token IDs.
  • Web changes: support SDK token objects, normalize them back to legacy token IDs for UI, derive Permit2 funding calldata via getCoordinatorFundingCallDataPermit2, use Permit2 as the allowance spender, and create generic EVM→Arkade swaps when needed.
  • Infrastructure and compat: switch external API proxy from apilendaswap.lendasat.com to api.lendaswap.com, add the events dependency and Vite alias for browser builds required by the upgraded dependency tree, and update various type/adaptor helpers.

Testing

  • Ran full typecheck with pnpm typecheck across workspaces, which completed successfully.
  • Built the web app with pnpm build:web and fixed browser export/alias issues so the production build completed (note: large bundle warning only).
  • Ran unit & e2e test suite with pnpm test (Vitest), and all tests passed (121 tests, 5 files in this run).

Codex Task

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 6, 2026

Copy link
Copy Markdown

Deploying claw-cash-landing-page with  Cloudflare Pages  Cloudflare Pages

Latest commit: 81c4eab
Status: ✅  Deploy successful!
Preview URL: https://8fd01e44.claw-cash-landing-page.pages.dev
Branch Preview URL: https://codex-open-pr-to-upgrade-len.claw-cash-landing-page.pages.dev

View logs

@tiero
tiero merged commit b6a2da0 into main May 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant