Fix History from URI. Fix paypro. Fix join
This commit is contained in:
parent
10cc7fdf53
commit
d46a53c404
5 changed files with 82 additions and 53 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('addressbookViewController', function($scope, $state, $timeout, $stateParams, lodash, addressbookService, popupService) {
|
||||
angular.module('copayApp.controllers').controller('addressbookViewController', function($scope, $state, $timeout, $stateParams, lodash, addressbookService, popupService, $ionicHistory) {
|
||||
|
||||
var address = $stateParams.address;
|
||||
|
||||
|
|
@ -26,9 +26,10 @@ angular.module('copayApp.controllers').controller('addressbookViewController', f
|
|||
});
|
||||
|
||||
$scope.sendTo = function() {
|
||||
$state.go('^.^.send');
|
||||
$ionicHistory.clearHistory();
|
||||
$state.go('tabs.send');
|
||||
$timeout(function() {
|
||||
$state.go('.amount', {
|
||||
$state.transitionTo('tabs.send.amount', {
|
||||
toAddress: $scope.addressbookEntry.address,
|
||||
toName: $scope.addressbookEntry.name,
|
||||
toEmail: $scope.addressbookEntry.email
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('amountController', function($rootScope, $scope, $filter, $timeout, $ionicHistory, $ionicScrollDelegate, $ionicNavBarDelegate, gettextCatalog, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, txFormatService) {
|
||||
angular.module('copayApp.controllers').controller('amountController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, $ionicNavBarDelegate, gettextCatalog, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, txFormatService) {
|
||||
$ionicNavBarDelegate.title(gettextCatalog.getString('Enter Amount'));
|
||||
$ionicNavBarDelegate.showBackButton(true);
|
||||
|
||||
var unitToSatoshi;
|
||||
var satToUnit;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, $ionicNavBarDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, $ionicPopup, gettext, txFormatService, ongoingProcess, $ionicModal, popupService) {
|
||||
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, $ionicNavBarDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, $ionicPopup, gettext, txFormatService, ongoingProcess, $ionicModal, $ionicHistory, popupService) {
|
||||
$ionicNavBarDelegate.title(gettextCatalog.getString('Confirm'));
|
||||
var cachedTxp = {};
|
||||
var isChromeApp = platformInfo.isChromeApp;
|
||||
|
|
@ -77,6 +77,13 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
};
|
||||
|
||||
$scope.init = function() {
|
||||
if ($stateParams.paypro) {
|
||||
return setFromPayPro($stateParams.paypro, function(err) {
|
||||
if (err && !isChromeApp) {
|
||||
showAlert(gettext('Could not fetch payment'));
|
||||
}
|
||||
});
|
||||
}
|
||||
// TODO (URL , etc)
|
||||
if (!$stateParams.toAddress || !$stateParams.toAmount) {
|
||||
$log.error('Bad params at amount')
|
||||
|
|
@ -261,7 +268,8 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
if (err) return;
|
||||
walletService.publishAndSign(wallet, txp, function(err, txp) {
|
||||
if (err) return setSendError(err);
|
||||
$state.transitionTo('tabs.home');
|
||||
$ionicHistory.clearHistory();
|
||||
$state.go('tabs.home');
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue