diff --git a/core/src/apps/common/storage/recovery_shares.py b/core/src/apps/common/storage/recovery_shares.py index 2e73db1a6f..ac03fc43e3 100644 --- a/core/src/apps/common/storage/recovery_shares.py +++ b/core/src/apps/common/storage/recovery_shares.py @@ -9,7 +9,7 @@ if False: # Each mnemonic is stored under key = index. -def set(index: int, mnemonic: str, group_index: int) -> None: +def set(index: int, group_index: int, mnemonic: str) -> None: common.set( common.APP_RECOVERY_SHARES, index + group_index * slip39.MAX_SHARE_COUNT, diff --git a/core/src/apps/management/recovery_device/recover.py b/core/src/apps/management/recovery_device/recover.py index af161626cd..d697b5b438 100644 --- a/core/src/apps/management/recovery_device/recover.py +++ b/core/src/apps/management/recovery_device/recover.py @@ -40,7 +40,7 @@ def process_slip39(words: str) -> Tuple[Optional[bytes], slip39.Share]: storage.recovery.set_slip39_remaining_shares( share.threshold - 1, share.group_index ) - storage.recovery_shares.set(share.index, words, share.group_index) + storage.recovery_shares.set(share.index, share.group_index, words) # if share threshold and group threshold are 1 # we can calculate the secret right away @@ -67,7 +67,7 @@ def process_slip39(words: str) -> Tuple[Optional[bytes], slip39.Share]: remaining_for_share - 1, share.group_index ) remaining[share.group_index] = remaining_for_share - 1 - storage.recovery_shares.set(share.index, words, share.group_index) + storage.recovery_shares.set(share.index, share.group_index, words) if remaining.count(0) < share.group_threshold: # we need more shares