<commit_before>function WalletSellAssetsController($modal, $scope, $http, $q, userService) {
 // [ Form Validation]

  $scope.showErrors = false;

  // [ Template Initialization ]

  $scope.currencyList = userService.getCurrencies(); // [{symbol: 'BTC', addresses:[], name: 'BTC'}, {symbol: 'MSC', addresses:[], name: 'MSC'}, {symbol: 'TMSC', addresses:[], name: 'TMSC'}]
  $scope.selectedCoin = $scope.currencyList[0];
  $scope.currencyList.forEach(function(e,i){
    if(e.symbol == "MSC")
      $scope.selectedCoin = e;
  });

  $scope.addressList = getAddressesWithPrivkey();
  $scope.selectedAddress = $scope.addressList[0];

  function getAddressesWithPrivkey() {
    var addresses = [];
    userService.getAllAddresses().map(
      function(e,i,a) {
        if(e.privkey && e.privkey.length == 58) {
          addresses.push(e.address);
        }
      }
    );
    if( addresses.length == 0)
      addresses = ['Could not find any addresses with attached private keys!'];
    else {
      addresses.map(
        function(e,i,a){<commit_msg>Update addresses when selected coin changes.<commit_after>function WalletSellAssetsController($modal, $scope, $http, $q, userService) {
 // [ Form Validation]

  $scope.showErrors = false;

  // [ Template Initialization ]

  $scope.currencyList = userService.getCurrencies(); // [{symbol: 'BTC', addresses:[], name: 'BTC'}, {symbol: 'MSC', addresses:[], name: 'MSC'}, {symbol: 'TMSC', addresses:[], name: 'TMSC'}]
  $scope.selectedCoin = $scope.currencyList[0];
  $scope.currencyList.forEach(function(e,i){
    if(e.symbol == "MSC")
      $scope.selectedCoin = e;
  });

  $scope.addressList = getAddressesWithPrivkey();
  $scope.selectedAddress = $scope.addressList[0];
  
  $scope.$watch('selectedCoin', function(){
    $scope.addressList = getAddressesWithPrivkey();
    $scope.selectedAddress = $scope.addressList[0];
  });

  function getAddressesWithPrivkey() {
    var addresses = [];
    userService.getAllAddresses().map(
      function(e,i,a) {
        if(e.privkey && e.privkey.length == 58) {
          addresses.push(e.address);
        }
      }
    );
    if( addresses.length == 0)
      addresses = ['Could not find any addresses with attached private keys!'];
    else {
      addresses.map(
        function(e,i,a){
{'fraction_non_alphanumeric': 0.16827344434706398, 'fraction_numerical': 0.004820333041191937, 'mean_word_length': 3.5751503006012024, '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': '3207380', 'n_tokens_mistral': 745, 'n_tokens_neox': 724, 'n_words': 142}