public async Task <BuildTransactionResponse> BuildSingleTransactionAsync(BuildSingleTransactionRequest request,
                                                                                 decimal feeFactor)
        {
            if (request.OperationId == Guid.Empty)
            {
                throw new BusinessException(ErrorReason.BadRequest, "Operation id is invalid");
            }

            // Check to see if already broadcasted.
            var cachedResult = await _broadcastTxRepo.GetAsync(request.OperationId.ToString());

            if (cachedResult != null)
            {
                throw new BusinessException(ErrorReason.DuplicateRecord, "Operation already broadcast");
            }

            var unsignedTx = await _unsignedTxRepo.GetAsync(request.OperationId.ToString());

            if (unsignedTx?.ResponseJson != null)
            {
                return(JsonConvert.DeserializeObject <BuildTransactionResponse>(unsignedTx.ResponseJson));
            }

            var response = await _builder.BuildSingleTransactionAsync(request, feeFactor);

            var entity = new UnsignedTransactionEntity(
                request.OperationId,
                JsonConvert.SerializeObject(request),
                JsonConvert.SerializeObject(response)
                );

            await _unsignedTxRepo.InsertAsync(entity);

            return(response);
        }