<commit_before>'use strict';
angular.module('copayApp.services').factory('bannerService', function ($http, $log) {
  // Export
  var root = {};

  // Constant
  var API_URL = 'https://bwscash.bitcoin.com/bws/api/v1/marketing';

  // Variable
  var hasFetched = false;
  var banners = [];
  var defaultBanner = {
    id: 'default-banner',
    imageURL: 'img/banner-store.png',
    url: 'https://store.bitcoin.com/',
    isLocal: true
  };

  // Private methods
  var fetchSettings = function (cb) {
    var req = {
      method: 'GET',
      url: API_URL+'/settings',
      headers: {
        'Content-Type': 'application/json',
        'Accept': 'application/json'
      }
    };
    $http(req).then(function (response) {
      $log.info('Get banner settings: SUCCESS');
      banners = response.data;
      return cb(true);
    }, function (error) {
      $log.error('Get banner settings: ERROR ' + response.statusText);
      return cb(false);
    });
  };

  root.getBanner = function (cb) {
    
    // If not fetch get the banner
    if (!hasFetched) {
      hasFetched = true;

      // If never fetch, lets fetch<commit_msg>catch error fix<commit_after>'use strict';
angular.module('copayApp.services').factory('bannerService', function ($http, $log) {
  // Export
  var root = {};

  // Constant
  var API_URL = 'https://bwscash.bitcoin.com/bws/api/v1/marketing';

  // Variable
  var hasFetched = false;
  var banners = [];
  var defaultBanner = {
    id: 'default-banner',
    imageURL: 'img/banner-store.png',
    url: 'https://store.bitcoin.com/',
    isLocal: true
  };

  // Private methods
  var fetchSettings = function (cb) {
    var req = {
      method: 'GET',
      url: API_URL+'/settings',
      headers: {
        'Content-Type': 'application/json',
        'Accept': 'application/json'
      }
    };
    $http(req).then(function (response) {
      $log.info('Get banner settings: SUCCESS');
      banners = response.data;
      return cb(true);
    }, function (error) {
      $log.error('Get banner settings: ERROR ' + error.statusText);
      return cb(false);
    });
  };

  root.getBanner = function (cb) {
    
    // If not fetch get the banner
    if (!hasFetched) {
      hasFetched = true;

      // If never fetch, lets fetch
{'fraction_non_alphanumeric': 0.15656789031402035, 'fraction_numerical': 0.0008845643520566122, 'mean_word_length': 2.5069767441860464, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '4311164', 'n_tokens_mistral': 757, 'n_tokens_neox': 736, 'n_words': 167}