Merge pull request #2248 from matiu/bugs/wp

ACK
This commit is contained in:
Matias Pando 2014-12-30 11:50:34 -03:00
commit 4bf37bfb60
6 changed files with 22 additions and 12 deletions

View file

@ -4,7 +4,8 @@ angular.module('copayApp.controllers').controller('HomeWalletController', functi
$scope.initHome = function() { $scope.initHome = function() {
$rootScope.title = 'Home'; $rootScope.title = 'Home';
var w = $rootScope.wallet; var w = $rootScope.wallet;
if (w.isShared()) $scope.isShared = w.isShared();
if ($scope.isShared)
$scope.copayers = w.getRegisteredPeerIds(); $scope.copayers = w.getRegisteredPeerIds();
}; };

View file

@ -10,9 +10,11 @@ angular.module('copayApp.controllers').controller('SendController',
$scope.init = function() { $scope.init = function() {
var w = $rootScope.wallet; var w = $rootScope.wallet;
preconditions.checkState(w); preconditions.checkState(w);
preconditions.checkState(w.settings.unitToSatoshi); 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.loading = false;
$scope.error = $scope.success = null; $scope.error = $scope.success = null;
@ -125,7 +127,7 @@ angular.module('copayApp.controllers').controller('SendController',
if (msg.match('expired')) if (msg.match('expired'))
msg = 'The payment request has 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; ' could not be created: ' + msg;
$scope.error = message; $scope.error = message;

View file

@ -48,8 +48,15 @@ _.each(levels, function(level, levelName) {
if (Error.stackTraceLimit && this.level == 'debug') { if (Error.stackTraceLimit && this.level == 'debug') {
var old = Error.stackTraceLimit; var old = Error.stackTraceLimit;
Error.stackTraceLimit = 2 Error.stackTraceLimit = 2;
var stack = new Error().stack; var stack;
// this hack is to be compatible with IE11
try {
anerror();
} catch (e) {
stack = e.stack;
}
var lines = stack.split('\n'); var lines = stack.split('\n');
var caller = lines[2]; var caller = lines[2];
caller = ':' + caller.substr(6); caller = ':' + caller.substr(6);

View file

@ -21,7 +21,7 @@
"url": "https://github.com/bitpay/copay/issues" "url": "https://github.com/bitpay/copay/issues"
}, },
"dependencies": { "dependencies": {
"browser-request": "^0.3.2", "browser-request": "git://github.com/matiu/browser-request.git#67200dd4ec133457fb7dc69f005540f92b543f0a",
"inherits": "^2.0.1", "inherits": "^2.0.1",
"lodash": "^2.4.1", "lodash": "^2.4.1",
"optimist": "^0.6.1", "optimist": "^0.6.1",
@ -45,7 +45,6 @@
"bitcore": "git://github.com/bitpay/bitcore.git#0d238f116500a732057ec9dd80a8a87b2190ca49", "bitcore": "git://github.com/bitpay/bitcore.git#0d238f116500a732057ec9dd80a8a87b2190ca49",
"blanket": "^1.1.6", "blanket": "^1.1.6",
"browser-pack": "^2.0.1", "browser-pack": "^2.0.1",
"browser-request": "^0.3.2",
"browserify": "^3.32.1", "browserify": "^3.32.1",
"buffertools": "^2.0.1", "buffertools": "^2.0.1",
"chai": "^1.9.1", "chai": "^1.9.1",

View file

@ -37,8 +37,8 @@
<div class="row "> <div class="row ">
<div class="large-12 columns line-t m10t"> <div class="large-12 columns line-t m10t">
<div class="right size-12"> <div class="right size-12">
<span ng-if="!$root.wallet.isShared()">Personal Wallet</span> <span ng-if="!isShared">Personal Wallet</span>
<span ng-if="$root.wallet.isShared()"> <span ng-if="isShared">
Multisignature wallet [{{$root.wallet.requiredCopayers}} of {{$root.wallet.totalCopayers}} ] Multisignature wallet [{{$root.wallet.requiredCopayers}} of {{$root.wallet.totalCopayers}} ]
</span> </span>
<span ng-if="$root.wallet.isTestnet()"> in TESTNET</span> <span ng-if="$root.wallet.isTestnet()"> in TESTNET</span>
@ -50,7 +50,7 @@
</div> </div>
<div ng-show="$root.wallet.isShared()"> <div ng-show="isShared">
<div class="row"> <div class="row">
<div class="large-12 columns"> <div class="large-12 columns">
<div class="panel oh"> <div class="panel oh">
@ -73,7 +73,7 @@
</div> </div>
</div> </div>
<div class="row" ng-if="$root.wallet.isShared()"> <div class="row" ng-if="isShared">
<!-- List of copayers --> <!-- List of copayers -->
<div class="large-12 columns"> <div class="large-12 columns">
<div class="panel oh"> <div class="panel oh">

View file

@ -131,7 +131,8 @@
<small translate class="has-error" ng-show="sendForm.comment.$invalid && !sendForm.comment.$pristine">too long!</small> <small translate class="has-error" ng-show="sendForm.comment.$invalid && !sendForm.comment.$pristine">too long!</small>
</label> </label>
<div class="input"> <div class="input">
<textarea id="comment" ng-disabled="loading" name="comment" placeholder="{{($root.wallet.isShared() ? 'Leave a private message to your copayers' : 'Add a private comment to identify the transaction')}}" ng-maxlength="100" ng-model="_comment"></textarea> <textarea id="comment" ng-disabled="loading" name="comment" ng-if="isShared" placeholder="Leave a private message to your copayers" ng-maxlength="100" ng-model="_comment"></textarea>
<textarea id="comment" ng-disabled="loading" name="comment" ng-if="!isShared" placeholder="Add a private comment to identify the transaction" ng-maxlength="100" ng-model="_comment"></textarea>
</div> </div>
</div> </div>
</div> </div>