Esempio n. 1
0
 def window_opened(self, window):
     wallet = window.wallet
     if cosigner_pool.is_enabled() and type(wallet) == Multisig_Wallet:
         items = []
         for key, keystore in wallet.keystores.items():
             xpub = keystore.get_master_public_key()
             K = deserialize_xpub(xpub)[-1]
             K_hash = bh2u(sha256d(K))
             items.append(
                 CosignerItem(window, xpub, K, K_hash,
                              keystore.is_watching_only()))
         # Presumably atomic
         self.items.extend(items)
Esempio n. 2
0
 def window_opened(self, window: 'ElectrumWindow'):
     wallet = window.parent_wallet.get_default_wallet()
     if cosigner_pool.is_enabled() and type(wallet) is Multisig_Wallet:
         items = []
         for keystore in wallet.get_keystores():
             xpub = keystore.get_master_public_key()
             pubkey = bip32_key_from_string(xpub)
             K = pubkey.to_bytes()
             K_hash = bh2u(sha256d(K))
             items.append(
                 CosignerItem(window, xpub, K, K_hash,
                              keystore.is_watching_only()))
         # Presumably atomic
         self.items.extend(items)