mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
trezorctl: use capabilities to detect Shamir backup (fixes #445)
This commit is contained in:
parent
cefb1cf4fd
commit
8b4db0f074
@ -563,10 +563,16 @@ def reset_device(
|
|||||||
strength = int(strength)
|
strength = int(strength)
|
||||||
|
|
||||||
client = connect()
|
client = connect()
|
||||||
if client.features.model == "1" and backup_type != proto.BackupType.Bip39:
|
if (
|
||||||
|
backup_type == proto.BackupType.Slip39_Basic
|
||||||
|
and proto.Capability.Shamir not in client.features.capabilities
|
||||||
|
) or (
|
||||||
|
backup_type == proto.BackupType.Slip39_Advanced
|
||||||
|
and proto.Capability.ShamirGroups not in client.features.capabilities
|
||||||
|
):
|
||||||
click.echo(
|
click.echo(
|
||||||
"WARNING: Trezor One currently does not support Shamir backup.\n"
|
"WARNING: Your Trezor device does not indicate support for the requested\n"
|
||||||
"Traditional single-seed backup will be generated instead."
|
"backup type. Traditional single-seed backup may be generated instead."
|
||||||
)
|
)
|
||||||
|
|
||||||
return device.reset(
|
return device.reset(
|
||||||
|
Loading…
Reference in New Issue
Block a user