delete unused code and fixes
This commit is contained in:
parent
b2a02ac88a
commit
e2b995102c
5 changed files with 20 additions and 104 deletions
|
|
@ -57,7 +57,8 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
}
|
||||
|
||||
var filteredWallets = [];
|
||||
var index = 0, enoughFunds = false;
|
||||
var index = 0;
|
||||
var enoughFunds = false;
|
||||
|
||||
lodash.each(wallets, function(w) {
|
||||
walletService.getStatus(w, {}, function(err, status) {
|
||||
|
|
@ -311,6 +312,9 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
popupService.showConfirm(null, message, okText, cancelText, function(ok) {
|
||||
if (!ok) {
|
||||
$scope.sendStatus = '';
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
});
|
||||
return;
|
||||
}
|
||||
publishAndSign(wallet, txp, onSendStatusChange);
|
||||
|
|
@ -331,14 +335,11 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
};
|
||||
|
||||
function statusChangeHandler(processName, showName, isOn) {
|
||||
console.log('in statusChangeHandler', processName, showName, isOn);
|
||||
console.log('$scope.wallet', $scope.wallet);
|
||||
if(
|
||||
(processName === 'broadcastingTx' ||
|
||||
((processName === 'signingTx') && $scope.wallet.m > 1)) && !isOn) {
|
||||
$log.debug('statusChangeHandler: ', processName, showName, isOn);
|
||||
if ((processName === 'broadcastingTx' || ((processName === 'signingTx') && $scope.wallet.m > 1)) && !isOn) {
|
||||
$scope.sendStatus = 'success';
|
||||
$scope.$digest();
|
||||
} else if(showName) {
|
||||
} else if (showName) {
|
||||
$scope.sendStatus = showName;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,49 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('txStatusController', function($scope, $timeout, $state, $stateParams, $ionicHistory, $log, addressbookService) {
|
||||
angular.module('copayApp.controllers').controller('txStatusController', function($scope, $timeout) {
|
||||
|
||||
if ($scope.cb) $timeout($scope.cb, 100);
|
||||
|
||||
var previousView = $ionicHistory.viewHistory().backView && $ionicHistory.viewHistory().backView.stateName;
|
||||
$scope.fromSendTab = previousView.match(/tabs.send/) ? true : false;
|
||||
$scope.fromBitPayCard = previousView.match(/tabs.bitpayCard/) ? true : false;
|
||||
$scope.fromPayPro = $stateParams.paypro ? true : false;
|
||||
|
||||
$scope.cancel = function() {
|
||||
$scope.txStatusModal.hide();
|
||||
if ($scope.fromSendTab) {
|
||||
$ionicHistory.removeBackView();
|
||||
$state.go('tabs.send');
|
||||
$timeout(function() {
|
||||
$state.transitionTo('tabs.home');
|
||||
}, 100);
|
||||
} else if ($scope.fromBitPayCard) {
|
||||
$ionicHistory.removeBackView();
|
||||
$timeout(function() {
|
||||
$state.transitionTo('tabs.bitpayCard');
|
||||
}, 100);
|
||||
}
|
||||
};
|
||||
|
||||
$scope.save = function(addressbookEntry) {
|
||||
$scope.txStatusModal.hide();
|
||||
$ionicHistory.nextViewOptions({
|
||||
disableAnimate: true,
|
||||
disableBack: true
|
||||
});
|
||||
$ionicHistory.removeBackView();
|
||||
$state.go('tabs.send.addressbook', {
|
||||
fromSendTab: $scope.fromSendTab,
|
||||
addressbookEntry: addressbookEntry
|
||||
});
|
||||
}
|
||||
|
||||
addressbookService.list(function(err, ab) {
|
||||
if (err) $log.error(err);
|
||||
if (ab[$scope.tx.toAddress]) {
|
||||
$scope.entryExist = true;
|
||||
$log.debug('Entry already exist');
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue