fix miniscript teleport & teleport UI

This commit is contained in:
scgbckbone 2025-10-21 17:38:56 +02:00
parent 727beab889
commit f34faaf57d
3 changed files with 22 additions and 4 deletions

View File

@ -2867,6 +2867,8 @@ class psbtObject(psbtProxy):
# provide the set of xfp's that still need to sign PSBT
# - used to find which multisig-signer needs to go next
rv = set()
done_keys = set()
for inp in self.inputs:
if inp.fully_signed:
continue
@ -2876,10 +2878,14 @@ class psbtObject(psbtProxy):
# already signed
continue
done_keys = {}
# only get this once for each input
if inp.taproot_script_sigs:
done_keys = {xo for xo, _ in inp.get_taproot_script_sigs()}
for xo, _ in inp.get_taproot_script_sigs():
done_keys.add(xo)
if inp.tr_added_sigs:
for (xo, _) in inp.tr_added_sigs:
done_keys.add(xo)
for i, (k, v) in enumerate(inp.taproot_subpaths):
xpk = self.get(k)
@ -2897,9 +2903,12 @@ class psbtObject(psbtProxy):
rv.add(xfp)
else:
done_keys = {}
if inp.part_sigs:
done_keys = {self.get(k) for k, _ in inp.part_sigs}
for k, _ in inp.part_sigs:
done_keys.add(self.get(k))
if inp.added_sigs:
for k, _ in inp.added_sigs:
done_keys.add(k)
for k, v in inp.subpaths:
if self.get(k) not in done_keys:
xfp = self.handle_zero_xfp(self.parse_xfp_path(v), self.my_xfp, None)[0]

View File

@ -233,6 +233,7 @@ def pick_noid_key():
async def kt_decode_rx(is_psbt, payload):
# we are getting data back from a sender, decode it.
dis.fullscreen("Wait...")
prompt = 'Teleport Password (text)'

View File

@ -912,6 +912,14 @@ def test_teleport_miniscript_sign(dev, taproot, policy, get_cc_key, bitcoind, us
title, story = cap_story()
assert title == 'Sent by Teleport'
# try to enter the menu again & make sure "No more signers?" is not shown
need_keypress('t')
time.sleep(.1)
m = cap_menu()
assert len(m) == len(signers)
assert 'YOU' in [ln for ln in m if my_xfp in ln][0]
press_cancel()
# switch personalities, and try to read that QR
new_xfp = set_bip39_pw(str(idx) + str(idx))
use_regtest()