fix for new addresses in send

This commit is contained in:
matiu 2017-09-14 12:27:45 -03:00
commit 8c3397e698
5 changed files with 29 additions and 6 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $interval, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, $stateParams, $window, $state, $log, profileService, bitcore, txFormatService, ongoingProcess, $ionicModal, popupService, $ionicHistory, $ionicConfig, payproService, feeService, bwcError, txConfirmNotification) {
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $interval, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, $stateParams, $window, $state, $log, profileService, bitcore, bitcoreCash, txFormatService, ongoingProcess, $ionicModal, popupService, $ionicHistory, $ionicConfig, payproService, feeService, bwcError, txConfirmNotification) {
var countDown = null;
var CONFIRM_LIMIT_USD = 20;
@ -120,6 +120,8 @@ angular.module('copayApp.controllers').controller('confirmController', function(
};
// Setup $scope
//
var B = data.stateParams.coin == 'bch' ? bitcoreCash : bitcore;
// Grab stateParams
tx = {
@ -137,7 +139,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
toName: data.stateParams.toName,
toEmail: data.stateParams.toEmail,
toColor: data.stateParams.toColor,
network: (new bitcore.Address(data.stateParams.toAddress)).network.name,
network: (new B.Address(data.stateParams.toAddress)).network.name,
coin: data.stateParams.coin,
txp: {},
};

View file

@ -30,7 +30,7 @@ angular.module('copayApp.controllers').controller('createController',
$scope.formData.derivationPath = derivationPathHelper.default;
$scope.formData.coin = 'btc';
if (config.cashSupport.enabled) $scope.enableCash = true;
if (config.cashSupport) $scope.enableCash = true;
$scope.setTotalCopayers(tc);
updateRCSelect(tc);