make click to pay flow match slide to pay flow

This commit is contained in:
Marty Alcala 2016-10-10 15:27:57 -04:00
commit d5e72eede0
6 changed files with 82 additions and 2 deletions

View file

@ -190,6 +190,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
};
var setSendError = function(msg) {
$scope.sendStatus = '';
popupService.showAlert(gettextCatalog.getString('Error at confirm:'), msg);
};
@ -197,7 +198,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.fee = txFormatService.formatAmountStr(txp.fee);
$scope.txp = txp;
$scope.$apply();
};
}
var createTx = function(wallet, dryRun, cb) {
var config = configService.getSync().wallet;
@ -327,6 +328,8 @@ angular.module('copayApp.controllers').controller('confirmController', function(
}
}
$scope.statusChangeHandler = statusChangeHandler;
$scope.onConfirm = function() {
$scope.approve(statusChangeHandler);
};
@ -335,6 +338,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$ionicHistory.nextViewOptions({
disableAnimate: true
});
$scope.sendStatus = '';
$state.go('tabs.send');
};

View file

@ -0,0 +1,20 @@
'use strict';
angular.module('copayApp.directives')
.directive('clickToAccept', function() {
return {
restrict: 'E',
templateUrl: 'views/includes/clickToAccept.html',
transclude: true,
scope: {
sendStatus: '=clickSendStatus',
},
link: function(scope, element, attrs) {
scope.$watch('sendStatus', function() {
if(scope.sendStatus !== 'success') {
scope.displaySendStatus = scope.sendStatus;
}
});
}
};
});