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.
pull/2914/head
matejcik 1 year ago committed by matejcik
parent 92c037d89e
commit 35f4e1ce19

@ -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"));

Loading…
Cancel
Save