mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-15 19:08:07 +00:00
core/storage: swap arguments in recovery_shares.set
This commit is contained in:
parent
6938d2b238
commit
cf5a794436
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user