bugfix: testnet vs mainnet

This commit is contained in:
Peter D. Gray 2021-04-30 13:45:58 -04:00
parent a9299d485c
commit 703b2995ce
No known key found for this signature in database
GPG Key ID: F0E6CC6AFC16CF7B
2 changed files with 3 additions and 2 deletions

View File

@ -268,7 +268,7 @@ def generate_unchained_export(acct_num=0):
# - no account numbers (at this level)
from public_constants import AF_P2SH, AF_P2WSH_P2SH, AF_P2WSH
chain = chains.BitcoinMain
chain = chains.current_chain()
todo = [
( "m/45'", 'p2sh', AF_P2SH), # iff acct_num == 0
( "m/48'/{coin}'/{acct_num}'/1'", 'p2sh_p2wsh', AF_P2WSH_P2SH ),

View File

@ -337,6 +337,7 @@ def test_export_unchained(dev, cap_menu, pick_menu_item, goto_home, cap_story, n
node = BIP32Node.from_wallet_key(xpub)
assert xpub == node.hwif(as_private=False)
sk = root.subkey_for_path(obj[f'{k}_deriv'][2:] + '.pub')
assert node.chain_code() == sk.chain_code()
#assert node.chain_code() == sk.chain_code()
assert node.hwif() == sk.hwif()
# EOF