Splits creating personal and multisign wallets

This commit is contained in:
Gustavo Maximiliano Cortez 2015-05-20 04:05:13 -03:00
commit ce0a7584b3
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
2 changed files with 21 additions and 8 deletions

View file

@ -29,18 +29,19 @@ angular.module('copayApp.controllers').controller('createController',
}
var updateRCSelect = function(n) {
$scope.totalCopayers = n;
var maxReq = COPAYER_PAIR_LIMITS[n];
self.RCValues = lodash.range(1, maxReq + 1);
$scope.requiredCopayers = Math.min(parseInt(n / 2 + 1), maxReq);
};
$scope.$watch('totalCopayers', function(tc) {
updateRCSelect(tc);
});
this.TCValues = lodash.range(1, defaults.limits.totalCopayers + 1);
this.TCValues = lodash.range(2, defaults.limits.totalCopayers + 1);
$scope.totalCopayers = defaults.wallet.totalCopayers;
this.setTotalCopayers = function(tc) {
updateRCSelect(tc);
};
this.create = function(form) {
if (form && form.$invalid) {
this.error = gettext('Please enter the required fields');