layout: fix last commit

pull/25/head
Pavol Rusnak 7 years ago
parent f70772fb58
commit cd763b979b
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -14,7 +14,7 @@ if len(sys.argv) != 2 or sys.argv[1] not in ("count", "array"):
def get_fields(coin):
return [
'"%s"' % coin['coin_name'] if coin['coin_name'] is not None else 'NULL',
'" %s to"' % coin['coin_shortcut'] if coin['coin_shortcut'] is not None else 'NULL',
'" %s"' % coin['coin_shortcut'] if coin['coin_shortcut'] is not None else 'NULL',
'%d' % coin['maxfee_kb'] if coin['maxfee_kb'] is not None else '0',
'"\\x%02x" "%s"' % (len(coin['signed_message_header']), coin['signed_message_header'].replace('\n', '\\n')) if coin['signed_message_header'] is not None else 'NULL',
'true' if coin['address_type'] is not None else 'false',

@ -126,8 +126,9 @@ void layoutHome(void)
void layoutConfirmOutput(const CoinInfo *coin, const TxOutputType *out)
{
char str_out[32];
bn_format_uint64(out->amount, NULL, coin->coin_shortcut, BITCOIN_DIVISIBILITY, 0, false, str_out, sizeof(str_out));
char str_out[32 + 3];
bn_format_uint64(out->amount, NULL, coin->coin_shortcut, BITCOIN_DIVISIBILITY, 0, false, str_out, sizeof(str_out) - 3);
strlcat(str_out, " to", sizeof(str_out));
static char lines[2][28];
const char *addr = out->address;
int addrlen = strlen(addr);

Loading…
Cancel
Save