fix send form

This commit is contained in:
Matias Alejo Garcia 2014-12-30 10:37:04 -03:00
commit 6f94825d2d
5 changed files with 13 additions and 9 deletions

View file

@ -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();
};

View file

@ -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;

View file

@ -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