mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-13 19:18:56 +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)
|
||||
|
||||
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(
|
||||
"WARNING: Trezor One currently does not support Shamir backup.\n"
|
||||
"Traditional single-seed backup will be generated instead."
|
||||
"WARNING: Your Trezor device does not indicate support for the requested\n"
|
||||
"backup type. Traditional single-seed backup may be generated instead."
|
||||
)
|
||||
|
||||
return device.reset(
|
||||
|
Loading…
Reference in New Issue
Block a user