1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00

fix(legacy): display very large amounts

Previously, an amount whose decimal representation with suffix does not
fit in buffer would not be rendered at all. This looks weird in
"Send                          to address 0xblabla".

Enlarging the buffer lets the amount be stringified. Then it won't fit
on screen so this is not a perfect fix, but "Send 25000000... to
address" is better than before.
This commit is contained in:
matejcik 2023-03-17 15:02:59 +01:00 committed by matejcik
parent 92c037d89e
commit 35f4e1ce19

View File

@ -343,7 +343,7 @@ static void layoutEthereumConfirmTx(const uint8_t *to, uint32_t to_len,
memcpy(pad_val + (32 - value_len), value, value_len);
bn_read_be(pad_val, &val);
char amount[32] = {0};
char amount[64] = {0};
if (token == NULL) {
if (bn_is_zero(&val)) {
strcpy(amount, _("message"));