The signing popup decided whether to show the message view or the
transaction view by inspecting fields on the payload (`data`,
`blockNumber`), while the background picks the signing behaviour from the
message channel the request arrived on. Those two are independent and the
payload comes from the dapp, so they can disagree.
`RequestSign` becomes a discriminated union on `channel`, set by the
background from the message type. Correlating the discriminant with the
payload type means consumers narrow through `isExtrinsicRequest` rather
than casting, so the display and the signing path can no longer drift
apart. `Tabs.extrinsicSign` also rejects a payload carrying a truthy
`data`, since that field has no meaning on that channel.
Also branches the signing render on the request rather than on decoded
state. Paging between two queued requests of different shapes could
otherwise commit one frame using the previous request's decoded payload.
Tests added under `signer channel` in `Extension.spec.ts`.
* feat(ui): allow generic Ledger app to derive from any chain via polkadot slip44
* feat: allow Ledger generic app accounts to sign on any chain
* fix(extension-ui): guard generic ledger init and stabilize i18n deps
* fix: prefer WebHID over WebUSB for Ledger transport to fix Flex/Nano X connectivity
* fix(ui): release Ledger transport with explicit disconnect lifecycle
* fix(ui): align Ledger app mode with reactive settings context
* refactor(ui): keep useLedger render phase pure for init errors
* fix(ui): apply popup-aware routing to Ledger connection links
* fix(ui): harden Ledger signing error handling and mismatch UX
- Remove chain.name being set as specName from merkleizeMetadata payload
- Use reactive SettingsContext ledgerApp instead of settings.get() snapshot
- Guard no-metadata signing path with setIsBusy(false) + early return
- Detect signer mismatch by normalizing addresses and block signing when mismatched
* fix: missing checkmark for connected accounts
* fix: lint
* chore: sanitize raw ip while considering localhost urls/ip
* fix: connect accounts for authorization
* fix: ensure there is an open port connection before sending a port message
* chore: remove unnecessary console.log
* fix: prevent Error: Invalid url messages when setting a non http active tab
* fix test
* Update manifest.json
* replace `extension.getUrl` to `runtime.getUrl`
* Update localStorage to async chrome.storage.local
* Change action to browserAction
* fix bug
* revert async changes
* revert test change
* Fix localStorage breaking change
* .extension -> .runtime
* fix undefined behaviour
* fixed tests
* lint
* Up some callbacks to async
* Change where extractMetadata is called
* fix in mock
* Update background field to take in type
* Change background.js to service_worker.js
* Update id and request origin for service worker
* updated chrome mock
* 13 tests passing
* Fix async issue
* switch naming back to original
* linting
* Fix linting in base
* remove timeOut
* added permission to alarms in manifest
* fixed alarms uncaught errors
* Cleanup addr for tests
---------
Co-authored-by: bee344 <alberto.penayo@parity.io>