mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-15 19:08:07 +00:00
core: simplify fetch_slip39_remaining_shares
This commit is contained in:
parent
cb029fa905
commit
e4ac47b0b3
@ -131,14 +131,10 @@ def fetch_slip39_remaining_shares() -> Optional[List[int]]:
|
|||||||
if not remaining:
|
if not remaining:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
result = []
|
|
||||||
group_count = get_slip39_group_count()
|
group_count = get_slip39_group_count()
|
||||||
if not group_count:
|
if not group_count:
|
||||||
raise RuntimeError
|
raise RuntimeError
|
||||||
for i in range(group_count):
|
return list(remaining[:group_count])
|
||||||
result.append(remaining[i])
|
|
||||||
|
|
||||||
return result[:group_count]
|
|
||||||
|
|
||||||
|
|
||||||
def end_progress() -> None:
|
def end_progress() -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user