def do_send(self, tx):
    for (window, xpub, K, _hash) in self.cosigner_list:
        if (not self.cosigner_can_sign(tx, xpub)):
            continue
        raw_tx_bytes = bfh(str(tx))
        message = bitcoin.encrypt_message(raw_tx_bytes, bh2u(K)).decode('ascii')
        try:
            server.put(_hash, message)
        except Exception as e:
            traceback.print_exc(file=sys.stdout)
            window.show_message('Failed to send transaction to cosigning pool.')
            return
        window.show_message('Your transaction was sent to the cosigning pool.\nOpen your cosigner wallet to retrieve it.')
def do_send(self, tx):
    for (window, xpub, K, _hash) in self.cosigner_list:
        if (not self.cosigner_can_sign(tx, xpub)):
            continue
        raw_tx_bytes = bfh(str(tx))
        message = bitcoin.encrypt_message(raw_tx_bytes, bh2u(K)).decode('ascii')
        try:
            server.put(_hash, message)
        except Exception as e:
            traceback.print_exc(file=sys.stdout)
            window.show_message('Failed to send transaction to cosigning pool.')
            return
        window.show_message('Your transaction was sent to the cosigning pool.\nOpen your cosigner wallet to retrieve it.')