diff --git a/src/js/controllers/confirm.js b/src/js/controllers/confirm.js index 80179dad2..9f4c312ec 100644 --- a/src/js/controllers/confirm.js +++ b/src/js/controllers/confirm.js @@ -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, diff --git a/src/js/controllers/tab-scan.js b/src/js/controllers/tab-scan.js index beb46397c..f04bad7cf 100644 --- a/src/js/controllers/tab-scan.js +++ b/src/js/controllers/tab-scan.js @@ -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(); }); diff --git a/src/js/directives/incomingDataMenu.js b/src/js/directives/incomingDataMenu.js index ee316f305..a43351438 100644 --- a/src/js/directives/incomingDataMenu.js +++ b/src/js/directives/incomingDataMenu.js @@ -13,16 +13,11 @@ angular.module('copayApp.directives') scope.showMenu = true; scope.https = false; - console.log('scope.type', scope.type); if(scope.type === 'url') { - console.log('scope.data', scope.data); - console.log('scope.data.indexOf("https://")', scope.data.indexOf('https://')); if(scope.data.indexOf('https://') === 0) { scope.https = true; } } - - console.log('data', data); }); }); scope.hide = function() { diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index 45db00212..5c2bbd133 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -8,11 +8,6 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni $rootScope.$broadcast('incomingDataMenu.showMenu', data); }; - // $timeout(function() { - // var data = 'https://bitpay.com'; - // root.redir(data); - // }, 2000); - root.redir = function(data) { $log.debug('Processing incoming data: ' + data); @@ -52,10 +47,6 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni } data = sanitizeUri(data); - // data = '1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX'; - //data = 'msEVvmpiFEtXv3MdsFLUYMbnNLeNYrqBEA'; - //data = 'alkjsdflkajsdf'; - console.log('brroooooo'); // BIP21 if (bitcore.URI.isValid(data)) { @@ -86,11 +77,9 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni getPayProDetails(data, function(err, details) { if(err) { - console.log('getPayProDetails err', err); root.showMenu({data: data, type: 'url'}); return; } - console.log('paypro details', details); $state.go('tabs.send'); var stateParams = { toAmount: details.amount, @@ -107,13 +96,13 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni } else if (bitcore.Address.isValid(data, 'testnet')) { root.showMenu({data: data, type: 'bitcoinAddress'}); // Protocol - } else if (data && data.indexOf($window.appConfig.name + '://glidera')==0) { + } else if (data && data.indexOf($window.appConfig.name + '://glidera') === 0) { return $state.go('uriglidera', {url: data}); - } else if (data && data.indexOf($window.appConfig.name + '://coinbase')==0) { + } else if (data && data.indexOf($window.appConfig.name + '://coinbase') === 0) { return $state.go('uricoinbase', {url: data}); // BitPayCard Authentication - } else if (data && data.indexOf($window.appConfig.name + '://')==0) { + } else if (data && data.indexOf($window.appConfig.name + '://') === 0) { var secret = getParameterByName('secret', data); var email = getParameterByName('email', data); var otp = getParameterByName('otp', data); @@ -140,7 +129,6 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni }); return true; } else { - console.log('unrecognized dood'); root.showMenu({data: data, type: 'text'}); } @@ -164,24 +152,14 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni $log.debug('Fetch PayPro Request...', uri); - console.log('show fetchingPayPro loader'); ongoingProcess.set('fetchingPayPro', true); - //debugger; - // 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); } diff --git a/src/sass/views/includes/actionSheet.scss b/src/sass/views/includes/actionSheet.scss index c7e26a5f3..5e9fb7fd4 100644 --- a/src/sass/views/includes/actionSheet.scss +++ b/src/sass/views/includes/actionSheet.scss @@ -9,7 +9,7 @@ action-sheet { bottom: 0; left: 50%; transform: translateY(100%) translateX(-50%); - transition: transform 250ms cubic-bezier(0.4, 0.0, 0.2, 1) !important; + transition: transform 250ms cubic-bezier(0.4, 0.0, 0.2, 1); z-index: 100; padding-top: 1.75rem; padding-left: 1.25rem; diff --git a/www/views/confirm.html b/www/views/confirm.html index 5fe10b6e3..0050cada1 100644 --- a/www/views/confirm.html +++ b/www/views/confirm.html @@ -62,9 +62,8 @@
- Fee + Fee: {{feeLevel}} - {{fee || '...'}}