def update(self, window):
    wallet = window.wallet
    if (type(wallet) != Multisig_Wallet):
        return
    if (self.listener is None):
        self.print_error('starting listener')
        self.listener = Listener(self)
        self.listener.start()
    elif self.listener:
        self.print_error('shutting down listener')
        self.listener.stop()
        self.listener = None
    self.keys = []
    self.cosigner_list = []
    for (key, keystore) in wallet.keystores.items():
        xpub = keystore.get_master_public_key()
        K = bitcoin.deserialize_xpub(xpub)[(- 1)]
        _hash = bh2u(bitcoin.Hash(K))
        if (not keystore.is_watching_only()):
            self.keys.append((key, _hash, window))
        else:
            self.cosigner_list.append((window, xpub, K, _hash))
    if self.listener:
        self.listener.set_keyhashes([t[1] for t in self.keys])
def update(self, window):
    wallet = window.wallet
    if (type(wallet) != Multisig_Wallet):
        return
    if (self.listener is None):
        self.print_error('starting listener')
        self.listener = Listener(self)
        self.listener.start()
    elif self.listener:
        self.print_error('shutting down listener')
        self.listener.stop()
        self.listener = None
    self.keys = []
    self.cosigner_list = []
    for (key, keystore) in wallet.keystores.items():
        xpub = keystore.get_master_public_key()
        K = bitcoin.deserialize_xpub(xpub)[(- 1)]
        _hash = bh2u(bitcoin.Hash(K))
        if (not keystore.is_watching_only()):
            self.keys.append((key, _hash, window))
        else:
            self.cosigner_list.append((window, xpub, K, _hash))
    if self.listener:
        self.listener.set_keyhashes([t[1] for t in self.keys])