From 6f94825d2d4c14e3c073a469f334c56dc91c421c Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 30 Dec 2014 10:37:04 -0300 Subject: [PATCH] fix send form --- js/controllers/homeWallet.js | 3 ++- js/controllers/send.js | 6 ++++-- js/util/log.js | 2 +- views/homeWallet.html | 8 ++++---- views/send.html | 3 ++- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/js/controllers/homeWallet.js b/js/controllers/homeWallet.js index dd4e7e985..548598e73 100644 --- a/js/controllers/homeWallet.js +++ b/js/controllers/homeWallet.js @@ -4,7 +4,8 @@ angular.module('copayApp.controllers').controller('HomeWalletController', functi $scope.initHome = function() { $rootScope.title = 'Home'; var w = $rootScope.wallet; - if (w.isShared()) + $scope.isShared = w.isShared(); + if ($scope.isShared) $scope.copayers = w.getRegisteredPeerIds(); }; diff --git a/js/controllers/send.js b/js/controllers/send.js index afc1d8fbf..371123545 100644 --- a/js/controllers/send.js +++ b/js/controllers/send.js @@ -10,9 +10,11 @@ angular.module('copayApp.controllers').controller('SendController', $scope.init = function() { var w = $rootScope.wallet; preconditions.checkState(w); + preconditions.checkState(w.settings.unitToSatoshi); - $rootScope.title = w.isShared() ? 'Send Proposal' : 'Send'; + $scope.isShared = w.isShared(); + $rootScope.title =$scope.isShared ? 'Send Proposal' : 'Send'; $scope.loading = false; $scope.error = $scope.success = null; @@ -125,7 +127,7 @@ angular.module('copayApp.controllers').controller('SendController', if (msg.match('expired')) msg = 'The payment request has expired'; - var message = 'The transaction' + (w.isShared() ? ' proposal' : '') + + var message = 'The transaction' + ($scope.isShared ? ' proposal' : '') + ' could not be created: ' + msg; $scope.error = message; diff --git a/js/util/log.js b/js/util/log.js index 0530e3130..c0e7a13a9 100644 --- a/js/util/log.js +++ b/js/util/log.js @@ -48,7 +48,7 @@ _.each(levels, function(level, levelName) { if (Error.stackTraceLimit && this.level == 'debug') { var old = Error.stackTraceLimit; - Error.stackTraceLimit = 2 + Error.stackTraceLimit = 2; var stack; // this hack is to be compatible with IE11 diff --git a/views/homeWallet.html b/views/homeWallet.html index 00e8f5314..12a83451f 100644 --- a/views/homeWallet.html +++ b/views/homeWallet.html @@ -37,8 +37,8 @@
- Personal Wallet - + Personal Wallet + Multisignature wallet [{{$root.wallet.requiredCopayers}} of {{$root.wallet.totalCopayers}} ] in TESTNET @@ -50,7 +50,7 @@
-
+
@@ -73,7 +73,7 @@
-
+
diff --git a/views/send.html b/views/send.html index 0771ef5c1..618072791 100644 --- a/views/send.html +++ b/views/send.html @@ -131,7 +131,8 @@ too long!
- + +