1
0

plugins: psbt_nostr: add comment about testnet/mainnet separation

This commit is contained in:
SomberNight
2025-06-10 14:45:25 +00:00
parent bbe3350937
commit f846a16f07
2 changed files with 4 additions and 2 deletions

View File

@@ -103,7 +103,9 @@ class CosignerWallet(Logger):
self.cosigner_list = [] # type: List[Tuple[str, str]]
self.nostr_pubkey = None
for key, keystore in wallet.keystores.items():
for keystore in wallet.get_keystores():
# note: there should be domain separation between testnet/mainnet.
# Currently there is, due to the xpub str encoding it in its header.
xpub = keystore.get_master_public_key() # type: str
privkey = sha256('nostr_psbt:' + xpub)
pubkey = ecc.ECPrivkey(privkey).get_public_key_bytes()[1:]

View File

@@ -4048,7 +4048,7 @@ class Multisig_Wallet(Deterministic_Wallet):
return [k.derive_pubkey(c, i).hex() for k in self.get_keystores()]
def load_keystore(self):
self.keystores = {}
self.keystores = {} # type: Dict[str, KeyStore]
for i in range(self.n):
name = 'x%d' % (i+1)
self.keystores[name] = load_keystore(self.db, name)