<commit_before>angular.module("omniControllers")
  .controller("ExchangeSaleController",["$scope", "Transaction", "ADDRESS_EXPLORER_URL", "SATOSHI_UNIT",
    function ExchangeSaleController($scope, Transaction, ADDRESS_EXPLORER_URL, SATOSHI_UNIT) {
                  $scope.editTransactionCost = function(){
                  $scope.modalManager.openTransactionCostModal($scope, $scope.confirm);
            }
      $scope.confirm = function(){
        //TODO: VALIDATIONS
        var fee = new Big($scope.minersFee);
        var exchangeSale = new Transaction(20,$scope.selectedAddress,fee,{
            transaction_version:1,
            amount_for_sale: +new Big($scope.saleAmount).valueOf(),
            amount_desired: $scope.salePrice,
            min_buyer_fee: new Big($scope.buyersFee).valueOf(),
            blocks: $scope.saleBlocks,
            currency_identifier: $scope.selectedAsset.symbol,
            action:1,
            donate: $scope.account.getSetting("donate")
          });


        $scope.modalManager.openConfirmationModal({
          dataTemplate: '/views/modals/partials/sale.html',
          scope:{
            title:"EXCHANGE.SALE.MODALTITLE",
            saleAmount: $scope.saleAmount,
            buyersFee: $scope.buyersFee,
            selectedCoin: $scope.selectedAsset,
            salePricePerCoin: $scope.salePrice / $scope.saleAmount,
            saleBlocks : $scope.saleBlocks,
            fees : $scope.minersFee,
            totalCost : exchangeSale.totalCost,
            confirmText:"EXCHANGE.SALE.CONFIRM",
            explorerUrl:ADDRESS_EXPLORER_URL,
            successRedirect:"/exchange/trade"
          },
          transaction:exchangeSale
        })
      }

      $scope.selectedAddress= $scope.hasCoins ? $scope.selectedAsset.tradableAddresses[0] : undefined;
      $scope.setAddress = function(address){<commit_msg>Send propertyid instead of symbol as currency identifier for sells<commit_after>angular.module("omniControllers")
  .controller("ExchangeSaleController",["$scope", "Transaction", "ADDRESS_EXPLORER_URL", "SATOSHI_UNIT",
    function ExchangeSaleController($scope, Transaction, ADDRESS_EXPLORER_URL, SATOSHI_UNIT) {
                  $scope.editTransactionCost = function(){
                  $scope.modalManager.openTransactionCostModal($scope, $scope.confirm);
            }
      $scope.confirm = function(){
        //TODO: VALIDATIONS
        var fee = new Big($scope.minersFee);
        var exchangeSale = new Transaction(20,$scope.selectedAddress,fee,{
            transaction_version:1,
            amount_for_sale: +new Big($scope.saleAmount).valueOf(),
            amount_desired: $scope.salePrice,
            min_buyer_fee: new Big($scope.buyersFee).valueOf(),
            blocks: $scope.saleBlocks,
            currency_identifier: $scope.selectedAsset.propertyid,
            action:1,
            donate: $scope.account.getSetting("donate")
          });


        $scope.modalManager.openConfirmationModal({
          dataTemplate: '/views/modals/partials/sale.html',
          scope:{
            title:"EXCHANGE.SALE.MODALTITLE",
            saleAmount: $scope.saleAmount,
            buyersFee: $scope.buyersFee,
            selectedCoin: $scope.selectedAsset,
            salePricePerCoin: $scope.salePrice / $scope.saleAmount,
            saleBlocks : $scope.saleBlocks,
            fees : $scope.minersFee,
            totalCost : exchangeSale.totalCost,
            confirmText:"EXCHANGE.SALE.CONFIRM",
            explorerUrl:ADDRESS_EXPLORER_URL,
            successRedirect:"/exchange/trade"
          },
          transaction:exchangeSale
        })
      }

      $scope.selectedAddress= $scope.hasCoins ? $scope.selectedAsset.tradableAddresses[0] : undefined;
      $scope.setAddress = function(address){
{'fraction_non_alphanumeric': 0.11090670170827858, 'fraction_numerical': 0.002628120893561104, 'mean_word_length': 2.524074074074074, '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': '969278', 'n_tokens_mistral': 1103, 'n_tokens_neox': 1059, 'n_words': 152}