/// <summary> /// Sends the notification. /// </summary> /// <param name="notification">The notification.</param> /// <returns></returns> private async Task SendNotification(WalletNotification notification) { try { using (var notificationService = new DepositNotifier()) { await notificationService.SendNotification(NotificationLevelType.Info, notification.UserId, notification.Header, notification.Message); } } catch (Exception ex) { LogError(ex, "SendNotification", "Failed to send notification"); } }
private async Task SendBalanceNotification(Guid userId, int currencyId, string symbol) { try { using (var notificationService = new DepositNotifier()) { await notificationService.SendDataNotification(DataNotificationType.BalanceUpdate, userId, new { CurrencyId = currencyId, Symbol = symbol }); } } catch (Exception ex) { LogError(ex, "SendNotification", "Failed to send notification"); } }