@api_request
async def send_transaction(self, request: wallet_protocol.SendTransaction, *, test=False) -> Optional[Message]:
    spend_name = request.transaction.name()
    (await self.full_node.transaction_queue.put((0, TransactionQueueEntry(request.transaction, None, spend_name, None, test))))
    (status, error) = (None, None)
    sleep_time = 0.01
    for i in range(int((45 / sleep_time))):
        (await asyncio.sleep(sleep_time))
        for (potential_name, potential_status, potential_error) in self.full_node.transaction_responses:
            if (spend_name == potential_name):
                status = potential_status
                error = potential_error
                break
        if (status is not None):
            break
    if (status is None):
        response = wallet_protocol.TransactionAck(spend_name, uint8(MempoolInclusionStatus.PENDING), None)
    else:
        error_name = (error.name if (error is not None) else None)
        if (status == MempoolInclusionStatus.SUCCESS):
            response = wallet_protocol.TransactionAck(spend_name, uint8(status.value), error_name)
        elif (self.full_node.mempool_manager.get_spendbundle(spend_name) is not None):
            response = wallet_protocol.TransactionAck(spend_name, uint8(MempoolInclusionStatus.SUCCESS.value), None)
        else:
            response = wallet_protocol.TransactionAck(spend_name, uint8(status.value), error_name)
    msg = make_msg(ProtocolMessageTypes.transaction_ack, response)
    return msg
@api_request
async def send_transaction(self, request: wallet_protocol.SendTransaction, *, test=False) -> Optional[Message]:
    spend_name = request.transaction.name()
    (await self.full_node.transaction_queue.put((0, TransactionQueueEntry(request.transaction, None, spend_name, None, test))))
    (status, error) = (None, None)
    sleep_time = 0.01
    for i in range(int((45 / sleep_time))):
        (await asyncio.sleep(sleep_time))
        for (potential_name, potential_status, potential_error) in self.full_node.transaction_responses:
            if (spend_name == potential_name):
                status = potential_status
                error = potential_error
                break
        if (status is not None):
            break
    if (status is None):
        response = wallet_protocol.TransactionAck(spend_name, uint8(MempoolInclusionStatus.PENDING), None)
    else:
        error_name = (error.name if (error is not None) else None)
        if (status == MempoolInclusionStatus.SUCCESS):
            response = wallet_protocol.TransactionAck(spend_name, uint8(status.value), error_name)
        elif (self.full_node.mempool_manager.get_spendbundle(spend_name) is not None):
            response = wallet_protocol.TransactionAck(spend_name, uint8(MempoolInclusionStatus.SUCCESS.value), None)
        else:
            response = wallet_protocol.TransactionAck(spend_name, uint8(status.value), error_name)
    msg = make_msg(ProtocolMessageTypes.transaction_ack, response)
    return msg