Example #1
0
        private async Task ProcessCashOut(CashOutCommand cmd)
        {
            var request = new TransferData
            {
                SourceAddress      = cmd.SourceAddress,
                DestinationAddress = cmd.DestinationAddress,
                Amount             = cmd.Amount,
                AssetId            = cmd.AssetId,
                TransactionId      = cmd.TransactionId
            };

            var response = await _bitcoinApiClient.TransferAsync(request);

            var reqMsg = $"{BitCoinCommands.CashOut}:{request.ToJson()}";

            await ProcessBitcoinApiResponse(reqMsg, BitCoinCommands.CashOut, response, cmd.Context);
        }