diff --git a/js/controllers/send.js b/js/controllers/send.js index 3af9941d2..a87e5c256 100644 --- a/js/controllers/send.js +++ b/js/controllers/send.js @@ -50,7 +50,7 @@ angular.module('copayApp.controllers').controller('SendController', var w = $rootScope.wallet; w.createTx(address, amount, commentText, function(ntxid) { - if (w.totalCopayers > 1) { + if (w.isShared()) { $scope.loading = false; var message = 'The transaction proposal has been created'; notification.success('Success!', message); diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index db37355cf..c7ae6403d 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -913,6 +913,10 @@ Wallet.prototype.toggleAddressBookEntry = function(key) { this.store(); }; +Wallet.prototype.isShared = function() { + return this.totalCopayers > 1; +} + Wallet.prototype.isReady = function() { var ret = this.publicKeyRing.isComplete() && this.publicKeyRing.isFullyBackup(); return ret; diff --git a/test/test.Wallet.js b/test/test.Wallet.js index 04b1626de..92810302b 100644 --- a/test/test.Wallet.js +++ b/test/test.Wallet.js @@ -363,6 +363,14 @@ describe('Wallet model', function() { }, w.reconnectDelay * callCount * (callCount + 1) / 2); }); + it('#isSingleUser', function() { + var w = createW(); + w.isShared().should.equal(true); + + w.totalCopayers = 1; + w.isShared().should.equal(false); + }); + it('#isReady', function() { var w = createW(); w.publicKeyRing.isComplete().should.equal(false); diff --git a/views/includes/sidebar.html b/views/includes/sidebar.html index 220358562..00e71bcd5 100644 --- a/views/includes/sidebar.html +++ b/views/includes/sidebar.html @@ -64,7 +64,7 @@ -
+
diff --git a/views/send.html b/views/send.html index e80ccda0e..816b02e3f 100644 --- a/views/send.html +++ b/views/send.html @@ -77,7 +77,7 @@ -
+