Retire the Ledger account path #5
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Scoped down to Ledger only. This issue previously also called for removing QR, on reasoning that turned out to be wrong — see the correction below and #9 / #10.
Ledger cannot work
There is no Quantus app for any hardware wallet, and
@polkadot/hw-ledgerspeaks ed25519 over the Ledger Substrate app.packages/extension-ui/src/Popup/ImportLedger.tsx,hooks/useLedger.tsandPopup/Signing/LedgerSign.tsxare all unreachable for a Quantus account.useLedger.tsalso makes its ownsetType('ed25519')/setType('ethereum')calls, which will fight whatever #3 does to the default type.Once quantus/common#6 narrows
KeypairTypeto the ML-DSA types this stops being a product decision and becomes a type error, so removing it now is bringing forward work that is coming regardless.What to do
Remove rather than hide behind a flag. This fork is not trying to stay mergeable with upstream (see #1), so unreachable UI costs more than it saves. Make the absence legible — an extension that silently lacks a menu item reads as broken; one that says hardware wallets are not supported on Quantus reads as finished.
ALLOWED_PATHinpackages/extension-base/src/defaults.tsgates which popup routes can open; prune the ones that no longer exist.Correction: the QR claim in the original issue was wrong
The original text said a 5261/7219-byte signature "does not fit a QR flow at any sensible density". That is false.
@polkadot/react-qralready splits payloads:Size is handled. I asserted a limit without checking it.
The real obstacle is protocol, and it applies only to signing:
That is the Parity Signer wire format, with the crypto type as a byte that has no ML-DSA value. Quantus's own air-gapped path uses multipart UR instead.
And "QR" was covering three unrelated things, only one of which is affected:
Retire the Ledger and QR account pathsto Retire the Ledger account pathDone. Branch
quantus-remove-ledger(87a0b392). Typecheck clean, 65 tests pass,yarn build:chromecompletes.Removed
ImportLedger.tsx,useLedger.ts,LedgerSign.tsx,legerChains.ts(upstream's typo), the route and itsALLOWED_PATHentry, the add-menu item, the Ledger App setting, and the@polkadot/hw-ledgerdependency. ~1250 lines.Also the background handler:
accountsCreateHardware, its message type andcreateAccountHardwarein messaging were reachable only fromImportLedger. Dead code that mints accounts is worth deleting rather than leaving for someone to wire up again.Two things deliberately kept
isHardwarestays onAccountJson. Nothing creates such an account now, but a restored JSON can carry the flag, and the display branches reading it are correct for that case — an imported hardware account has no key here and cannot sign. Removing the flag would touch unrelated display code to delete a branch that is right.canEditGenesisbecomes unconditional. It was!isHardware || ledgerApp === 'generic', because the chain-specific Ledger app could not sign for an arbitrary genesis hash. With no hardware path and no such setting, nothing restricts it. The two spec cases asserting the old behaviour are rewritten into one asserting the new rule.One thing this issue asked for that I did not do
No "hardware wallets are not supported" note in the add menu.
The issue's reasoning was that a missing item reads as broken — but that only holds for someone looking for it, and in a Quantus-only wallet nobody is. A permanent dead menu entry, needing translation into every locale, is a worse wart than its absence. It belongs in the README when branding lands (#2). Flagging it because I wrote the requirement and am now declining it, not because it slipped.
Where I stopped, and why
The QR-signer entry point is still there — "Attach external QR-signer account" in the add menu,
/account/import-qr,ImportQr.tsx. It speaks the Parity Signer protocol and hardcodessr25519, so an account created through it is unusable on Quantus.I did not remove it, because doing so is larger than it looks and touches a question worth deciding deliberately — see the note I have added to #10.
Verified against
main, closing.hw-ledgerdependency are gone from the tree,package.jsonandyarn.lock(87a0b392), andALLOWED_PATHis pruned.