When only 1 signature is required, broadcast at creation

This commit is contained in:
Ivan Socolsky 2014-09-29 19:02:32 -03:00
commit b15c620f0d
3 changed files with 13 additions and 1 deletions

View file

@ -142,7 +142,7 @@ angular.module('copayApp.controllers').controller('SendController',
});
}
if (w.isShared()) {
if (w.requiresMultipleSignatures()) {
$scope.loading = false;
var message = 'The transaction proposal has been created';
if (merchantData) {

View file

@ -2475,6 +2475,14 @@ Wallet.prototype.isShared = function() {
return this.totalCopayers > 1;
};
/**
* @desc Returns true if more than one signature is required
* @return {boolean}
*/
Wallet.prototype.requiresMultipleSignatures = function() {
return this.requiredCopayers > 1;
};
/**
* @desc Returns true if the keyring is complete and all users have backed up the wallet
* @return {boolean}

View file

@ -95,6 +95,10 @@ FakeWallet.prototype.isShared = function() {
return this.totalCopayers > 1;
}
FakeWallet.prototype.requiresMultipleSignatures = function() {
return this.requiredCopayers > 1;
};
FakeWallet.prototype.isReady = function() {
return true;
};