Fix routes

This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-16 21:01:19 -03:00
commit 10cc7fdf53
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
13 changed files with 76 additions and 92 deletions

View file

@ -26,10 +26,12 @@ angular.module('copayApp.controllers').controller('addressbookViewController', f
});
$scope.sendTo = function() {
$state.go('^.^.send');
$timeout(function() {
$state.transitionTo('send.amount', {
$state.go('.amount', {
toAddress: $scope.addressbookEntry.address,
toName: $scope.addressbookEntry.name
toName: $scope.addressbookEntry.name,
toEmail: $scope.addressbookEntry.email
});
}, 100);
};

View file

@ -2,6 +2,7 @@
angular.module('copayApp.controllers').controller('amountController', function($rootScope, $scope, $filter, $timeout, $ionicHistory, $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;
@ -188,7 +189,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
var _amount = evaluate(format($scope.amount));
var amount = $scope.showAlternativeAmount ? fromFiat(_amount).toFixed(unitDecimals) : _amount.toFixed(unitDecimals);
$state.transitionTo('send.confirm', {
$state.transitionTo('tabs.send.confirm', {
toAmount: amount * unitToSatoshi,
toAddress: $scope.toAddress,
toName: $scope.toName,

View file

@ -17,24 +17,14 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.showDescriptionPopup = function() {
$scope.data = {
comment: null
var title = gettextCatalog.getString('Add description');
var opts = {
defaultText: $scope.description
};
var commentPopup = $ionicPopup.show({
templateUrl: "views/includes/note.html",
title: gettextCatalog.getString('Set description'),
scope: $scope,
popupService.showPrompt(title, null, opts, function(res) {
if (res) $scope.description = res;
});
$scope.commentPopupClose = function() {
commentPopup.close();
};
$scope.commentPopupSave = function() {
$log.debug('Saving description: ' + $scope.data.comment);
$scope.description = $scope.data.comment;
commentPopup.close();
};
};
var setFromPayPro = function(uri, cb) {

View file

@ -75,7 +75,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
return;
}
$log.debug('Got toAddress:' + addr + ' | ' + item.name);
return $state.transitionTo('send.amount', {
return $state.transitionTo('tabs.send.amount', {
toAddress: addr,
toName: item.name,
toEmail: item.email