Browse Source

Don't crash if find_address() is called with a multisig address, but no ms_wallet

dev-v1.0.4
Ken Carpenter 4 years ago
parent
commit
ce8631b70e
  1. 4
      ports/stm32/boards/Passport/modules/utils.py

4
ports/stm32/boards/Passport/modules/utils.py

@ -511,6 +511,7 @@ def folder_exists(path):
def find_address(path, start_address_idx, address, addr_type, ms_wallet, max_to_check=100, reverse=False):
import stash
try:
with stash.SensitiveValues() as sv:
if ms_wallet:
# NOTE: Can't easily reverse order here, so this is slightly less efficient
@ -535,6 +536,9 @@ def find_address(path, start_address_idx, address, addr_type, ms_wallet, max_to_
if curr_address == address:
return (curr_idx, addr_path)
return (-1, None)
except Exception as e:
# Any address handling exceptions result in no address found
return (-1, None)
def get_accounts():
from common import settings

Loading…
Cancel
Save