Bug fixes. Split contacts and wallets from send

This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-23 17:10:34 -03:00
commit b370e61012
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
8 changed files with 36 additions and 16 deletions

View file

@ -10,10 +10,15 @@ angular.module('copayApp.controllers').controller('amountController', function($
var SMALL_FONT_SIZE_LIMIT = 13;
var LENGTH_EXPRESSION_LIMIT = 19;
$scope.isWallet = $stateParams.isWallet;
$scope.toAddress = $stateParams.toAddress;
$scope.toName = $stateParams.toName;
$scope.toEmail = $stateParams.toEmail;
$scope.$on('$ionicView.beforeLeave', function() {
angular.element($window).off('keydown');
});
$scope.$on("$ionicView.beforeEnter", function(event, data) {
if (!$stateParams.toAddress) {
@ -24,7 +29,6 @@ angular.module('copayApp.controllers').controller('amountController', function($
var reNr = /^[1234567890\.]$/;
var reOp = /^[\*\+\-\/]$/;
var disableKeys = angular.element($window).on('keydown', function(e) {
if (e.which === 8) { // you can add others here inside brackets.
e.preventDefault();
@ -46,10 +50,6 @@ angular.module('copayApp.controllers').controller('amountController', function($
});
$scope.$on('$destroy', function() {
angular.element($window).off('keydown');
});
var config = configService.getSync().wallet.settings;
$scope.unitName = config.unitName;
$scope.alternativeIsoCode = config.alternativeIsoCode;
@ -65,7 +65,6 @@ angular.module('copayApp.controllers').controller('amountController', function($
$scope.amount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals);
}
processAmount($scope.amount);
$timeout(function() {
@ -187,6 +186,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
var amount = $scope.showAlternativeAmount ? fromFiat(_amount).toFixed(unitDecimals) : _amount.toFixed(unitDecimals);
$state.transitionTo('tabs.send.confirm', {
isWallet: $scope.isWallet,
toAmount: amount * unitToSatoshi,
toAddress: $scope.toAddress,
toName: $scope.toName,