public async Task <GetWalletTransactionResponse> GetTransaction(GetWalletTransactionRequest request) { using (var currencyRepo = new Repository <Currency>()) { var currency = await currencyRepo.GetOrDefaultAsync(x => x.Id == request.CurrencyId); if (currency == null) { Log.Message(LogLevel.Error, "[GetTransaction] - Currency '{0}' not found.", request.CurrencyId); return(null); } try { //var wallet = new WalletConnector("127.0.0.1", 33113, "sa_ddam213.3", "213bit"); var wallet = new WalletConnector(currency.WalletHost, currency.WalletPort, currency.WalletUser, currency.WalletPass); return(new GetWalletTransactionResponse { TransactionData = await wallet.GetTransactionRawAsync(request.TxId.Trim()) }); } catch (Exception ex) { Log.Exception("[GetTransaction] - An exception occured during GetTransaction, CurrencyId: {0}.", ex, request.CurrencyId); } return(null); } }