public async Task <IActionResult> SendBtc([FromBody] SendBtcRequest req)
 {
     return(new JsonResult(new SuccessResponse()
     {
         Success = await _transactionService.SendBtc(req.Address, req.Amount)
     }));
 }
        public void SendBtc(string address, float amount)
        {
            var request = new SendBtcRequest {
                Address = address, Amount = amount
            };

            ExecuteRequest <SendBtcRequest, OkResponse>(request);
        }
Beispiel #3
0
        public async Task <ApiResponse> SendBtc([FromBody] SendBtcRequest request)
        {
            var addr   = AntiXssEncoder.HtmlEncode(request.Address, true);
            var result = await _txRepository.SaveOutTxAsync(addr, request.Amount);

            return(new ApiResponse {
                Code = result.GetHashCode(), Message = result.ToString()
            });
        }
Beispiel #4
0
 public Task <HttpResponseMessage> SendBtc([FromBody] SendBtcRequest request)
 {
     return(ExecuteAction(request, Repository.SendBtc));
 }
        public async Task <object> SendBtcAsync([FromBody] SendBtcRequest request)
        {
            var(isSucceed, errorMessage) = await _sendService.SendBtcAsync(request.FromWalletId, request.ToWalletAddress, request.Amount);

            return(new { isSucceed, errorMessage });
        }
Beispiel #6
0
 public BaseResponse SendBtc(SendBtcRequest request)
 {
     return(SendMessage <BaseRequest, GetLastResponse>(request, nameof(SendBtc)));
 }