fix set wallet

This commit is contained in:
Javier 2016-11-24 16:38:01 -03:00
commit 80f79c4bec

View file

@ -197,23 +197,26 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.$on('accepted', function(event) { $scope.$on('accepted', function(event) {
$scope.approve(); $scope.approve();
}); });
//
$scope.$on('Wallet/Changed', function(event, wallet) { // $scope.$on('Wallet/Changed', function(event, wallet) {
if (lodash.isEmpty(wallet)) { // if (lodash.isEmpty(wallet)) {
$log.debug('No wallet provided'); // $log.debug('No wallet provided');
return; // return;
} // }
$log.debug('Wallet changed: ' + wallet.name); // $log.debug('Wallet changed: ' + wallet.name);
setWallet(wallet, true); // setWallet(wallet, true);
}); // });
$scope.showWalletSelector = function() { $scope.showWalletSelector = function() {
$scope.showWallets = true; $scope.showWallets = true;
}; };
$scope.onWalletSelect = function(wallet) { $scope.onWalletSelect = function(wallet) {
if (!$scope.useSendMax) setWallet(wallet); if ($scope.useSendMax) {
else $scope.getSendMaxInfo(); $scope.wallet = wallet;
$scope.getSendMaxInfo();
} else
setWallet(wallet);
}; };
$scope.showDescriptionPopup = function() { $scope.showDescriptionPopup = function() {
@ -295,7 +298,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$timeout(function() { $timeout(function() {
$ionicScrollDelegate.resize(); $ionicScrollDelegate.resize();
$scope.$apply(); $scope.$apply();
}); }, 10);
}; };
var setSendError = function(msg) { var setSendError = function(msg) {