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); }
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() }); }
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 }); }
public BaseResponse SendBtc(SendBtcRequest request) { return(SendMessage <BaseRequest, GetLastResponse>(request, nameof(SendBtc))); }