<commit_before>'use strict';

angular.module('copayApp.controllers').controller('collectEmailController', function($scope, $state, $stateParams, $ionicScrollDelegate, profileService, configService, walletService, platformInfo) {

  var isCordova = platformInfo.isCordova;
  var isWP = platformInfo.isWP;
  var usePushNotifications = isCordova && !isWP;

  var wallet = profileService.getWallet($stateParams.walletId);
  var walletId = wallet.credentials.walletId;

  var config = configService.getSync();
  config.emailFor = config.emailFor || {};
  $scope.email = config.emailFor && config.emailFor[walletId];

  $scope.save = function(form) {
    var opts = {
      emailFor: {}
    };
    opts.emailFor[walletId] = $scope.email;

    walletService.updateRemotePreferences(wallet, {
      email: $scope.email,
    }, function(err) {
      if (err) $log.warn(err);
      configService.set(opts, function(err) {
        if (err) $log.warn(err);
        if (!usePushNotifications) $state.go('onboarding.backupRequest', {walletId: walletId});
        else $state.go('onboarding.notifications', {walletId: walletId});
      });
    });
  };

  $scope.onboardingMailSkip = function() {
    $state.go('onboarding.backupRequest', {walletId: walletId});
  };
});
<commit_msg>Removes ionicscrolldelegate<commit_after>'use strict';

angular.module('copayApp.controllers').controller('collectEmailController', function($scope, $state, $stateParams, profileService, configService, walletService, platformInfo) {

  var isCordova = platformInfo.isCordova;
  var isWP = platformInfo.isWP;
  var usePushNotifications = isCordova && !isWP;

  var wallet = profileService.getWallet($stateParams.walletId);
  var walletId = wallet.credentials.walletId;

  var config = configService.getSync();
  config.emailFor = config.emailFor || {};
  $scope.email = config.emailFor && config.emailFor[walletId];

  $scope.save = function(form) {
    var opts = {
      emailFor: {}
    };
    opts.emailFor[walletId] = $scope.email;

    walletService.updateRemotePreferences(wallet, {
      email: $scope.email,
    }, function(err) {
      if (err) $log.warn(err);
      configService.set(opts, function(err) {
        if (err) $log.warn(err);
        if (!usePushNotifications) $state.go('onboarding.backupRequest', {walletId: walletId});
        else $state.go('onboarding.notifications', {walletId: walletId});
      });
    });
  };

  $scope.onboardingMailSkip = function() {
    $state.go('onboarding.backupRequest', {walletId: walletId});
  };
});

{'fraction_non_alphanumeric': 0.14715189873417722, 'fraction_numerical': 0.0, 'mean_word_length': 4.214432989690722, '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': '1360925', 'n_tokens_mistral': 799, 'n_tokens_neox': 797, 'n_words': 136}