1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

legacy: fix not showing MultisigRedeemScriptType.nodes count correctly in GetAddress

This commit is contained in:
Pavol Rusnak 2019-10-24 13:30:09 +00:00
parent 93062c4cc2
commit c145db7dd2
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -221,7 +221,9 @@ void fsm_msgGetAddress(const GetAddress *msg) {
if (msg->has_multisig) {
strlcpy(desc, "Multisig __ of __:", sizeof(desc));
const uint32_t m = msg->multisig.m;
const uint32_t n = msg->multisig.pubkeys_count;
const uint32_t n = msg->multisig.nodes_count
? msg->multisig.nodes_count
: msg->multisig.pubkeys_count;
desc[9] = (m < 10) ? ' ' : ('0' + (m / 10));
desc[10] = '0' + (m % 10);
desc[15] = (n < 10) ? ' ' : ('0' + (n / 10));