Address QR: show and scan a plain SS58 string, not polkadot-js's payload #9
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?
Split out of #5, which wrongly lumped this in with air-gapped signing (#10). This one has no protocol problem at all and is worth keeping.
Why it matters
Getting an address from the desktop extension onto a phone. There is no good alternative — a Quantus address is 49 characters of base58 and retyping it is exactly the operation nobody should be doing by hand.
The Quantus mobile app already has both ends of this:
quantus_sdk/lib/src/ui/components/quantus_qr.dart, reached from the receive screenmobile-app/lib/v2/components/qr_scanner_page.dart, reached from send → select recipient and from swapThe format is a bare address
No envelope, no prefix, no genesis hash. So the extension must render the raw SS58 string.
What it must not use is polkadot-js's
QrDisplayAddress, which wraps it:A phone scanning that gets a string its validator rejects — or, worse, something that passes a loose validator and is not an address. The component is the wrong one; a plain QR of
pair.addressis the right one.Scope
Check before settling the format
The mobile scanner also accepts a
/paydeep link — its_handleCodebounds length and comments that "everything scanned here is an address or a /pay link". If that carries an amount or a reference, an extension showing a payment request rather than a bare address may be the more useful thing, and the two should at least not conflict. Worth reading that format before fixing ours.Also worth matching: the mobile QR embeds a Quantus logo and uses error-correction level M. Cosmetic, but a QR that looks like the one in the other app is easier to trust.
Acceptance