From 35f4e1ce19ce32e91240c4a8df98609bd892ed9d Mon Sep 17 00:00:00 2001 From: matejcik Date: Fri, 17 Mar 2023 15:02:59 +0100 Subject: [PATCH] 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. --- legacy/firmware/ethereum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/firmware/ethereum.c b/legacy/firmware/ethereum.c index 1f30d911c..04fc2fb6c 100644 --- a/legacy/firmware/ethereum.c +++ b/legacy/firmware/ethereum.c @@ -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"));