Skip to content

qt: PQC limit states are written differently in the PSBT and message-signing dialogs #166

Open

Description

@kiwidream

Report

The Qt dialogs that report consumed PQC signature capacity disagree on how a key's limit state is written.

After #141, the PSBT operations dialog formats usage through the shared qt/pqcusageformat helper, which renders the limit state as a translatable label:

PQC key <hex>: 12 of 100 signatures used, 88 remaining; state: Normal.

The sign/verify message dialog still formats usage with its own local helper (FormatPQCUsageStatus in src/qt/signverifymessagedialog.cpp), which renders the state by way of wallet::PQCSignatureLimitStateName, so the same state reads as the raw enum name:

PQC key <hex>: 12 of 100 signatures used, 88 remaining; state: NORMAL.

A user who signs a PSBT and signs a message with the same key sees the same state written two different ways. The meaning is identical, so this is cosmetic, but it is inconsistent and it leaves the same user-facing sentence duplicated in two translation contexts (PQCUsageFormat and SignVerifyMessageDialog), which doubles the translator's work and lets the two copies drift.

The raw enum names are also not translatable, so non-English users see an untranslated NORMAL / WARNING / CRITICAL / EXHAUSTED in that dialog.

Suggested fix

Route the sign/verify message dialog through qt/pqcusageformat and delete the duplicated local formatter, so every dialog shares one implementation, one set of strings and one translation context.

This was deliberately left out of #141 to keep that change scoped to the transaction-signing flows; the proof and message dialogs were explicitly out of its scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions