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

trezorctl: use capabilities to detect Shamir backup (fixes #445)

This commit is contained in:
matejcik 2019-09-19 16:46:07 +02:00
parent cefb1cf4fd
commit 8b4db0f074

View File

@ -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(