ghost-keychain/packages
Patricio e66446edc3
fix: derive raw vs extrinsic signing from the request channel (#1624)
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`.
2026-07-31 12:11:11 -03:00
..
extension [CI Skip] bump/beta 0.63.2-0-x 2026-07-30 18:24:37 +00:00
extension-base fix: derive raw vs extrinsic signing from the request channel (#1624) 2026-07-31 12:11:11 -03:00
extension-chains [CI Skip] bump/beta 0.63.2-0-x 2026-07-30 18:24:37 +00:00
extension-compat-metamask [CI Skip] bump/beta 0.63.2-0-x 2026-07-30 18:24:37 +00:00
extension-dapp [CI Skip] bump/beta 0.63.2-0-x 2026-07-30 18:24:37 +00:00
extension-inject [CI Skip] bump/beta 0.63.2-0-x 2026-07-30 18:24:37 +00:00
extension-mocks [CI Skip] bump/beta 0.63.2-0-x 2026-07-30 18:24:37 +00:00
extension-ui fix: derive raw vs extrinsic signing from the request channel (#1624) 2026-07-31 12:11:11 -03:00