1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 12:28:09 +00:00

fix(legacy): update account naming

[no changelog]
This commit is contained in:
Pavol Rusnak 2021-11-22 11:08:13 +01:00 committed by Martin Milata
parent d448d7b841
commit ee4ef81039

View File

@ -123,17 +123,19 @@ static const char *address_n_str(const uint32_t *address_n,
if (abbr && accnum < 100) { if (abbr && accnum < 100) {
memzero(path, sizeof(path)); memzero(path, sizeof(path));
strlcpy(path, abbr, sizeof(path)); strlcpy(path, abbr, sizeof(path));
// TODO: how to name accounts? // account naming:
// currently we have // "Legacy", "Legacy SegWit", "SegWit" and "Taproot"
// "legacy account", "account", "segwit account" and "taproot account"
// for BIP44/P2PKH, BIP49/P2SH-P2WPKH, BIP84/P2WPKH and BIP86/P2TR // for BIP44/P2PKH, BIP49/P2SH-P2WPKH, BIP84/P2WPKH and BIP86/P2TR
// respectively // respectively.
// For non-segwit coins we use only BIP44 with no special naming.
if (legacy) { if (legacy) {
strlcat(path, " legacy", sizeof(path)); strlcat(path, " Legacy", sizeof(path));
} else if (p2sh_segwit) {
strlcat(path, " L.SegWit", sizeof(path));
} else if (native_segwit) { } else if (native_segwit) {
strlcat(path, " segwit", sizeof(path)); strlcat(path, " SegWit", sizeof(path));
} else if (taproot) { } else if (taproot) {
strlcat(path, " taproot", sizeof(path)); strlcat(path, " Taproot", sizeof(path));
} }
if (address_is_account) { if (address_is_account) {
strlcat(path, " address #", sizeof(path)); strlcat(path, " address #", sizeof(path));