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

View file

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

View file

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