RunesSwap.app LogoRunesSwap.app

Changelog

[0.2.8] - 2025-12-29

Fixed

  • Swap quote errors for missing orders/liquidity now resolve to friendly messages without crashing the UI.
  • API client now throws when a success response is missing expected data.

[0.2.7] - 2025-12-29

Added

  • Added a Jest mock for the LaserEyes SDK to keep tests stable with ESM packages.

Changed

  • Updated dependency toolchain/testing packages (eslint, @eslint/eslintrc, @commitlint/config-conventional, jest/@types/jest, jest-environment-jsdom) and @omnisat/lasereyes.
  • Adjusted LaserEyes typings usage across swap/borrow flows to align with updated SDK types.
  • Updated Jest config to handle LaserEyes with pnpm-aware transform rules.

Removed

  • Removed ts-jest (no Jest 30-compatible release).

[Unreleased]

Added

  • Centralized QueryClient defaults and query key factories.
  • CI workflows: PR (type-check, lint, test) and main build.
  • Optional NEXT_PUBLIC_QUOTE_MOCK_ADDRESS to enable pre-connection quotes.
  • Footer layout refreshed: dedicated footer button styles, consistent heights, tightened spacing, and Docs moved next to GitHub.

Changed

  • Enforced Zod validation and standardized ok/fail across APIs; set dynamic = 'force-static' on static GETs.
  • Strict Mode effect cleanups (timers/listeners) for predictable behavior.
  • Re-enabled build-time linting.
  • Simplified Husky hooks to use lint-staged in pre-commit and checks in pre-push.
  • Migrated to ESLint 9 flat config and Prettier 3 config.
  • Scoped Next.js ESLint dirs and minor next.config.ts tidy.
  • Reduced unnecessary quote requests and improved swap percentage helpers.
  • Upgraded Next.js and related ESLint config to 15.2.6.

Fixed

  • Logging consistency: replaced stray console.* with logger in APIs; reduced noisy logs.
  • Enforced Zod response validation in src/app/api/ordiscan/btc-balance/route.ts.
  • Replaced ad-hoc query checks with Zod-based validation in src/app/api/ordiscan/rune-info-by-id/route.ts.
  • Removed unsafe assertions in src/hooks/useSwapExecution.ts by introducing PsbtApiResponse and a type guard; deduplicated SwapConfirmationResult; fixed finally-block to avoid stale state success re-dispatch.
  • Preserved swap error state in useSwapExecution so failures remain visible instead of resetting to idle.
  • Prevented swap quote fetch from getting stuck in loading when no wallet address is available by validating before starting the request.
  • Restored default read-only quote address so disconnected users still receive quotes when NEXT_PUBLIC_QUOTE_MOCK_ADDRESS is unset.
  • Kept /api/ordiscan/list-runes dynamic so new/updated runes stay fresh without redeploys.
  • PSBT creation now respects the client-provided fee rate with an optional SATS_TERMINAL_FORCED_FEE_RATE override for emergencies.
  • Quote display formatting now stays in Big.js to avoid precision loss; BTC balance display uses Big-based formatter.
  • PSBT confirmation error handling uses typed guards and proper 4xx responses instead of ad-hoc Response casting.
  • CI: pnpm is set up before the Node cache to keep pnpm caching effective.

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[0.2.6] - 2025-08-28

Changed

  • Refactored useSearchWithPopular hook to use React Query for search and popular rune flows with debounced input.
  • Updated tests to wrap hook consumers with QueryClientProvider.

Fixed

  • useSearchWithPopular: prefer fetched popular results over initialItems when available; correct isLoading/error derivation; sync cache only when initialItems change.

[0.2.5] - 2025-08-28

Added

  • Reusable useRuneBalances hook for fetching rune balances and refactored Borrow and Swap tabs to use it.
  • Centralized helper for retrieving and validating Liquidium JWTs used by borrow routes.
  • Centralized SatsTerminal error handler and wrapped PSBT endpoints with withApiHandler.
  • Helper to generate rune icon URLs and refactor existing hard-coded links.
  • Generic useSearchWithPopular hook for debounced search with optional popular-item caching.
  • Centralized usePopularRunes hook and refactored hooks/components to consume it.
  • Helper fetchRuneEndpoint for Ordiscan rune endpoints with accompanying tests.

Changed

  • Centralized rune route validation with shared helper.
  • Refactored FormattedRuneName to use the useRuneInfo hook.
  • useAssetSearch and useRunesSearch now leverage useSearchWithPopular.
  • Replace console statements with logger utilities.
  • Made useFeeRates accept optional React Query config and reused it in swap execution.
  • Refactored popular rune mapping into a generic utility.
  • Consolidated rune data fetching hooks with new useRuneDataQuery wrapper.
  • Updated changelog workflow to automatically trigger @claude when changelog validation fails, enabling automated changelog generation.
  • Enhanced Claude workflow permissions to allow contents and pull-requests write access for committing changelog updates.

[0.2.3] - 2025-08-24

Added

  • Changelog page at /changelog that renders CHANGELOG content without the preamble and link reference block (shows only versions, dates, and changes).
  • Footer "Changelog" button next to "Docs" for quick access.

[0.2.2] - 2025-08-23

Added

  • CI: Auto-create/update GitHub Releases from the top CHANGELOG section on merges to main.
  • CI: PR validation to ensure CHANGELOG top version matches package.json and is not [Unreleased].

[0.2.1] - 2025-08-23

Added

  • Enforce changelog updates via GitHub Actions workflow.
  • Claude PR assistant and automated code review workflows.
  • Popular runes normalizer (id/name/icon) with centralized mapping and de-duplication.
  • Fee selector with mempool.space rates and improved fee/UX handling.
  • Comprehensive test coverage for core hooks and APIs (e.g., useSwapExecution, useRunesSearch, useBorrowQuotes).

Changed

  • Major performance and infrastructure optimizations; organized codebase and consolidated API infrastructure.
  • Extracted repeated logic into shared hooks/utilities; switched to absolute @/ imports.
  • Centralized Liquidium API handling and aligned server routes with generated SDK types.
  • Adopted Big.js for precise financial calculations across swap/borrow flows.
  • Improved error handling and validation across API routes and UI.
  • Enabled Next Image optimizations and refined image remote patterns.
  • Tightened TypeScript strictness and stabilized Jest/jsdom test environment.

Fixed

  • Resolved borrow quotes infinite loop and memory issues in tests.
  • Handled Ordiscan 404 responses; corrected Liquidium API domain.
  • Improved collateral amount precision handling and validation.
  • Prevented stale selections in popular runes; preserved swap error states.
  • Addressed SSR and import issues (Suspense wrap, case-sensitive paths, Loading component imports).
  • Reduced local rate-limit hits to SatsTerminal; standardized quote response format.

Removed

  • Removed legacy TBA_API_URL usage and 98.css remnants.
  • Removed obsolete scripts and miscellaneous unused configuration.

Security

  • Restricted error log details in production API responses.

[0.2.0] - 2025-05-20

Added

  • Borrow functionality and Liquidium OpenAPI context; portfolio and repay flow.
  • Improved error handling and caching layers.
  • Test scaffolding and initial test suites.
  • Project tooling: ESLint, Prettier, Husky, lint-staged, Stylelint.

Changed

  • Updated Liquidium auth to respect proper RLS policies.
  • UI/UX refinements: layout tweaks, chart formatting, and consistency.

Fixed

  • Addressed multiple review feedback items and refined LTV display/formatting.
  • Ensured ES2020 compatibility for BigInt usage.
  • Enabled retry of loan process after cancellation in Xverse wallet.

[0.1.5] - 2025-04-26

Changed

  • Removed alpha disclaimer; updated styles.
  • Added percentage shortcuts for balance input in SwapTab.

[0.1.4] - 2025-04-23

Added

  • Updated logo and basic SEO improvements.
  • Price chart updates (sats display and more accurate data).

Changed

  • Addressed review nitpicks; refined layout and responsiveness.
  • Updated to SatsTerminal 1.6.7; improved .env.example guidance.

Removed

  • Removed redundant files and unused cursor rules.

[0.1.3] - 2025-04-23

Added

  • Debug logging for validatedParams in quote API route.

Changed

  • Prevented race conditions in quote fetching; ensure state updates only for latest request.
  • Layout/styling updates for AppInterface and overall responsiveness.

[0.1.2] - 2025-04-23

Changed

  • Enhanced PriceChart: forward-fill missing hourly data; improved type-safety and performance.

[0.1.1] - 2025-04-23

Fixed

  • Fixed LaserEyes wallet unmount behavior; updated cursor rules.

[0.1.0] - 2025-04-23

Added

  • Initial release: swap interface, price chart, core API routes and foundational UI.
Loading BTC price...