private async Task ProcessMessageAsync(NewWalletMessage arg) { _log.Info("Got a message about new wallet", arg.ToDetails()); await _walletsCache.SetItemAsync(new WalletState { Address = arg.Address, DueDate = arg.DueDate, Blockchain = Enum.Parse <BlockchainType>(arg.Blockchain.ToString()), Transactions = Enumerable.Empty <PaymentBcnTransaction>() }); }
public async Task PublishAsync(string walletAddress, BlockchainType blockchain, DateTime dueDate) { var message = new NewWalletMessage { Address = walletAddress, Blockchain = Enum.Parse <Contract.BlockchainType>(blockchain.ToString()), DueDate = dueDate }; _log.Info("Publishing new wallet message", message); await PublishAsync(message); }
public async Task PublishAsync(string walletAddress, BlockchainType blockchain, DateTime dueDate) { var message = new NewWalletMessage { Address = walletAddress, Blockchain = Enum.Parse <Contract.BlockchainType>(blockchain.ToString()), DueDate = dueDate }; await _log.WriteInfoAsync(nameof(WalletEventsPublisher), nameof(PublishAsync), message.ToJson(), "Publishing new wallet message"); await PublishAsync(message); }
public async Task PublishAsync(NewWalletMessage message) { await _publisher.ProduceAsync(message); }