Merge pull request #3977 from matiu/v19

fix prevent submit
This commit is contained in:
Matias Alejo Garcia 2016-03-09 08:20:48 -03:00
commit 139adb9974
1 changed files with 6 additions and 10 deletions

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $interval, $timeout, $filter, $modal, $log, notification, txStatus, isCordova, isMobile, profileService, lodash, configService, rateService, storageService, bitcore, isChromeApp, gettext, gettextCatalog, nodeWebkit, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService, txService){
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $interval, $timeout, $filter, $modal, $log, notification, txStatus, isCordova, isMobile, profileService, lodash, configService, rateService, storageService, bitcore, isChromeApp, gettext, gettextCatalog, nodeWebkit, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService, txService) {
var self = this;
window.ignoreMobilePause = false;
@ -351,7 +351,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$scope.paymentExpired = true;
$interval.cancel(countDown);
}
$scope.expires --;
$scope.expires--;
}, 1000);
};
@ -835,7 +835,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
}, 1);
};
// subscription
// subscription
this.setOngoingProcess = function(name) {
var self = this;
self.blockUx = !!name;
@ -856,6 +856,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
};
this.submitForm = function() {
if (!$scope._amount || !$scope._address || self.destinationWalletNeedsBackup) return;
var fc = profileService.focusedClient;
var unitToSat = this.unitToSatoshi;
var currentSpendUnconfirmed = configWallet.spendUnconfirmed;
@ -870,11 +871,6 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
}
var form = $scope.sendForm;
if (form.$invalid) {
this.error = gettext('Unable to send transaction proposal');
return;
}
var comment = form.comment.$modelValue;
// ToDo: use a credential's (or fc's) function for this
@ -1125,7 +1121,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
setExpiredPaymentValues();
$interval.cancel(countDown);
}
self.timeToExpire --;
self.timeToExpire--;
}, 1000);
function setExpiredPaymentValues() {
@ -1134,7 +1130,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
self._paypro = null;
self.error = gettext('Cannot sign: The payment request has expired');
};
};
};
this.setFromUri = function(uri) {
var self = this;