<commit_before>/**
 * @fileOverview Popup classes.
 */
'use strict';

/**
 * Controller for notifications
 * @param {Object} $scope Angular scope.
 * @constructor
 */
define(['frontend/controllers/module', 'darkwallet', 'frontend/port', 'dwutil/multisig'], function (controllers, DarkWallet, Port, MultisigFund) {
  controllers.controller('NotificationsCtrl', ['$scope', '$window', 'modals', 'notify', '$brc', function($scope, $window, modals, notify, $brc) {

  $scope.tasks = [];

  var linkTasks = function() {
      var identity = DarkWallet.getIdentity();
      var sections = Object.keys(identity.tasks.tasks);
      var tasks = [];
      sections.forEach(function(section) {
          identity.tasks.tasks[section].forEach(function(task) {
              if (!task.seen) {
                  // TODO: to be removed:
                  if (task.progress === undefined) {
                      task.progress = 33;
                  }
                  var outPocket, inPocket;
                  if (!(task.outPocket === undefined)) {
                      outPocket = identity.wallet.getPocket(task.outPocket);
                  }
                  if (!(task.inPocket === undefined)) {
                      inPocket = identity.wallet.getPocket(task.inPocket);
                  }
                  var guiTask = {section: section, store: task, outPocket: outPocket, inPocket: inPocket};
                  if (section == 'multisig') {
                      // Get this here so we don't need Object in angular :-P<commit_msg>Actually link modals to popup scope.<commit_after>/**
 * @fileOverview Popup classes.
 */
'use strict';

/**
 * Controller for notifications
 * @param {Object} $scope Angular scope.
 * @constructor
 */
define(['frontend/controllers/module', 'darkwallet', 'frontend/port', 'dwutil/multisig'], function (controllers, DarkWallet, Port, MultisigFund) {
  controllers.controller('NotificationsCtrl', ['$scope', '$window', 'modals', 'notify', '$brc', function($scope, $window, modals, notify, $brc) {

  $scope.tasks = [];
  $scope.modals = modals;

  var linkTasks = function() {
      var identity = DarkWallet.getIdentity();
      var sections = Object.keys(identity.tasks.tasks);
      var tasks = [];
      sections.forEach(function(section) {
          identity.tasks.tasks[section].forEach(function(task) {
              if (!task.seen) {
                  // TODO: to be removed:
                  if (task.progress === undefined) {
                      task.progress = 33;
                  }
                  var outPocket, inPocket;
                  if (!(task.outPocket === undefined)) {
                      outPocket = identity.wallet.getPocket(task.outPocket);
                  }
                  if (!(task.inPocket === undefined)) {
                      inPocket = identity.wallet.getPocket(task.inPocket);
                  }
                  var guiTask = {section: section, store: task, outPocket: outPocket, inPocket: inPocket};
                  if (section == 'multisig') {
                      // Get this here so we don't need Object in angular :-P
{'fraction_non_alphanumeric': 0.13567515307766678, 'fraction_numerical': 0.0012890750886239124, 'mean_word_length': 2.0641658440276407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4028786', 'n_tokens_mistral': 872, 'n_tokens_neox': 831, 'n_words': 200}