LedgerHQ/app-ethereum

Incomplete message display in handeSignPersonalMessage

yhql opened this issue · 1 comments

yhql commented

Description

When signing a personal message, for example with EIP191, a buffer of 100 characters is used to store as much of the incoming message as possible (or 256 on NanoX with the EIP191 PR

#ifdef TARGET_NANOS
#define SHARED_CTX_FIELD_1_SIZE 100
#else
#define SHARED_CTX_FIELD_1_SIZE 256
#endif
), and allow the user to navigate forward and backwards to read it. However this means we never display messages above 100 characters completely and cannot distinguish signing messages that are prefixed in the same way.

Your environment

Not relevant

Steps to reproduce

Simply look at the examples: this is the last part of the message defined here that is displayed on Nano S
https://github.com/LedgerHQ/app-ethereum/blob/fb677fc187ec88f05880af431edaa571d97a421d/tests/snapshots/nanos_eip191_opensea/00005.png

Proposed solution

Use the 100-chars buffer to store the last previously reviewed messages, udating it with every newly received message part.