This commit is contained in:
Marty Alcala 2016-10-19 16:45:29 -04:00
commit 01da9d91e4
6 changed files with 9 additions and 102 deletions

View file

@ -19,16 +19,9 @@ angular.module('copayApp.controllers').controller('confirmController', function(
});
var initConfirm = function() {
// if ($scope.paypro) {
// return setFromPayPro($scope.paypro, function(err) {
// if (err && !isChromeApp) {
// popupService.showAlert(gettext('Could not fetch payment'));
// }
// });
// }
// TODO (URL , etc)
if (!$scope.toAddress || !$scope.toAmount) {
$log.error('Bad params at amount')
$log.error('Bad params at amount');
throw ('bad params');
}
$scope.isCordova = platformInfo.isCordova;
@ -143,59 +136,6 @@ angular.module('copayApp.controllers').controller('confirmController', function(
return amountStr.split(' ')[1];
}
// var setFromPayPro = function(uri, cb) {
// if (!cb) cb = function() {};
//
// var wallet = profileService.getWallets({
// onlyComplete: true
// })[0];
//
// if (!wallet) return cb();
//
// if (isChromeApp) {
// popupService.showAlert(gettextCatalog.getString('Payment Protocol not supported on Chrome App'));
// return cb(true);
// }
//
// $log.debug('Fetch PayPro Request...', uri);
//
// ongoingProcess.set('fetchingPayPro', true);
// //debugger;
// var uri = 'https://bitpay.com/i/NhjqGZo1RNoHxiHxK7VBuM';
// uri = 'https://test.bitpay.com:443/i/LCy5Y7hxmEbkprAK27odAU';
// wallet.fetchPayPro({
// payProUrl: uri,
// }, function(err, paypro) {
// console.log('paypro', paypro);
// ongoingProcess.set('fetchingPayPro', false);
//
// if (err) {
// $log.warn('Could not fetch payment request:', err);
// var msg = err.toString();
// if (msg.match('HTTP')) {
// msg = gettextCatalog.getString('Could not fetch payment information');
// }
// popupService.showAlert(msg);
// return cb(true);
// }
//
// if (!paypro.verified) {
// $log.warn('Failed to verify payment protocol signatures');
// popupService.showAlert(gettextCatalog.getString('Payment Protocol Invalid'));
// return cb(true);
// }
//
// $scope.toAmount = paypro.amount;
// $scope.toAddress = paypro.toAddress;
// $scope.description = paypro.memo;
// $scope.paypro = null;
//
// $scope._paypro = paypro;
//
// return initConfirm();
// });
// };
function setWallet(wallet, delayed) {
var stop;
$scope.wallet = wallet;
@ -222,7 +162,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
});
}, delayed ? 2000 : 1);
}
};
}
var setSendError = function(msg) {
$scope.sendStatus = '';
@ -259,7 +199,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
var msg = 'Amount too big';
$log.warn(msg);
return setSendError(msg);
};
}
outputs.push({
'toAddress': toAddress,

View file

@ -11,10 +11,6 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
};
$scope.scannerStates = scannerStates;
$timeout(function() {
$scope.showActionSheet = true;
}, 2000);
function _updateCapabilities(){
var capabilities = scannerService.getCapabilities();
$scope.scannerIsAvailable = capabilities.isAvailable;
@ -105,7 +101,6 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
}
$rootScope.$on('incomingDataMenu.menuHidden', function() {
console.log('in herererere');
scannerService.resumePreview();
activate();
});