remove slider directive and replace sliders in paperwallet view

This commit is contained in:
Gabriel Bazán 2017-05-04 12:13:55 -03:00
commit dbc49e9ce0
5 changed files with 37 additions and 54 deletions

View file

@ -101,21 +101,15 @@ angular.module('copayApp.controllers').controller('paperWalletController',
$state.go('tabs.home');
};
$scope.$on('Wallet/Changed', function(event, wallet) {
if (!wallet) {
$log.debug('No wallet provided');
return;
}
if (wallet == $scope.wallet) {
$log.debug('No change in wallet');
return;
}
$scope.onWalletSelect = function(wallet) {
$scope.wallet = wallet;
$log.debug('Wallet changed: ' + wallet.name);
$timeout(function() {
$scope.$apply();
});
});
};
$scope.showWalletSelector = function() {
if ($scope.singleWallet) return;
$scope.walletSelectorTitle = gettextCatalog.getString('Transfer to');
$scope.showWallets = true;
};
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.scannedKey = (data.stateParams && data.stateParams.privateKey) ? data.stateParams.privateKey : null;
@ -127,6 +121,7 @@ angular.module('copayApp.controllers').controller('paperWalletController',
onlyComplete: true,
network: 'livenet',
});
$scope.singleWallet = $scope.wallets.length == 1;
if (!$scope.wallets || !$scope.wallets.length) {
$scope.noMatchingWallet = true;

View file

@ -127,7 +127,6 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
$scope.init = function() {
$scope.wallet = $scope.wallets[0];
$scope.updateCurrentWallet($scope.wallet);
$scope.showWalletSelector();
};
$scope.$on("$ionicView.leave", function(event, data) {