Skip to content

fix: cold wallet signs for any genesis hash - #645

Merged
n13 merged 2 commits into
mainfrom
n13/cold-wallet-accept-any-genesis
Sep 9, 2026
Merged

fix: cold wallet signs for any genesis hash#645
n13 merged 2 commits into
mainfrom
n13/cold-wallet-accept-any-genesis

Conversation

@n13

@n13 n13 commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Problem

Scanning a payload from a chain whose genesis hash is not in the cold wallet's network table showed "Could not read transaction / Unknown genesis hash" and refused to sign. Mainnet's genesis hash is not known at build time, so the shipped cold wallet could never sign mainnet transactions.

Change

  • QuantusPayloadParser.parsePayload no longer throws on an unlisted genesis hash. ParsedPayload.network is now nullable: the display name from knownNetworks when listed, otherwise null.
  • The sign screen's Advanced sheet always shows a Network: line: the known name, or Unknown when the genesis hash is not listed. The raw genesis hash line is unchanged and always shown.
  • No warning banner. Every other check (full call decode, extension decode, trailing bytes, metadata-mode consistency, spec drift banner) is untouched.

Follow-up once the mainnet genesis hash is known: #646.

Tests

  • SDK: the old "rejects unknown genesis" regression now asserts the retired-devnet vector decodes fully with network == null and spec drift flagged.
  • Cold wallet: same vector is asserted signable via signablePayload; a widget test pumps the sign screen with a foreign genesis hash and checks it reaches review with Network: Unknown and the raw hash in Advanced.

quantus_sdk/test/quantus_payload_parser_test.dart and the cold wallet signing, display, scan, and render suites pass.

n13 added 2 commits September 9, 2026 10:49
The signer no longer rejects payloads whose genesis hash is not in its
network table. The name is shown in Advanced when known, alongside the
raw genesis hash which is always shown; unlisted chains such as mainnet
sign like any other.
@n13
n13 merged commit a2b33de into main Sep 9, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant