Summary
MintToChecked and BurnChecked include a signed decimals byte, and the parser stores it in pi->extra_u8, but their confirmation screens render the base-unit integer directly as N tokens. The adjacent TransferChecked path correctly uses solana_formatTokenAmount(..., pi->extra_u8).
Example: an instruction encoding amount = 1000000000 and decimals = 9 represents 1 token, but the current device prompt says 1000000000 tokens.
This remains on current alpha; PR #557 adds MintTo mint/recipient identities but still renders the raw amount and does not fix BurnChecked.
Security / signing impact
The prompt does not faithfully represent the signed checked instruction's amount semantics. This can cause users to approve or reject based on a value off by up to the signed decimal exponent and makes the reviewed value inconsistent across otherwise analogous SPL checked instructions.
Code evidence
lib/firmware/solana.c assigns the checked instruction's byte 9 to pi->extra_u8 for MintToChecked/BurnChecked. lib/firmware/fsm_msg_solana.h ignores it in SOL_INSTR_TOKEN_MINT_TO and SOL_INSTR_TOKEN_BURN, while SOL_INSTR_TOKEN_TRANSFER already formats with it.
Acceptance criteria
- Format MintToChecked and BurnChecked with the signed decimals byte, using the same bounded formatter behavior as TransferChecked.
- Keep the unchecked MintTo/Burn encoding distinguishable (no fabricated decimals).
- Add boundary tests for 0, normal, and greater-than-supported decimal values.
Summary
MintToCheckedandBurnCheckedinclude a signed decimals byte, and the parser stores it inpi->extra_u8, but their confirmation screens render the base-unit integer directly asN tokens. The adjacentTransferCheckedpath correctly usessolana_formatTokenAmount(..., pi->extra_u8).Example: an instruction encoding
amount = 1000000000anddecimals = 9represents1 token, but the current device prompt says1000000000 tokens.This remains on current
alpha; PR #557 adds MintTo mint/recipient identities but still renders the raw amount and does not fix BurnChecked.Security / signing impact
The prompt does not faithfully represent the signed checked instruction's amount semantics. This can cause users to approve or reject based on a value off by up to the signed decimal exponent and makes the reviewed value inconsistent across otherwise analogous SPL checked instructions.
Code evidence
lib/firmware/solana.cassigns the checked instruction's byte 9 topi->extra_u8for MintToChecked/BurnChecked.lib/firmware/fsm_msg_solana.hignores it inSOL_INSTR_TOKEN_MINT_TOandSOL_INSTR_TOKEN_BURN, whileSOL_INSTR_TOKEN_TRANSFERalready formats with it.Acceptance criteria