do not select wallet on 'ready' message

This commit is contained in:
Ivan Socolsky 2014-10-20 10:50:03 -03:00 committed by Matias Alejo Garcia
parent 972b29b5de
commit 3191ba200c
4 changed files with 6 additions and 4 deletions

View File

@ -3,7 +3,7 @@ var defaultConfig = {
defaultLanguage: 'en',
// DEFAULT network (livenet or testnet)
networkName: 'livenet',
logLevel: 'debug',
logLevel: 'info',
// wallet limits

View File

@ -31,6 +31,7 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
controllerUtils.onErrorDigest(
$scope, (err.toString() || '').match('PNOTFOUND') ? 'Profile not found' : 'Unknown error');
} else {
console.log('$rootScope.wallet -->', $rootScope.wallet, 'FIRST WALLET ->', firstWallet);
controllerUtils.bindProfile($scope, iden, firstWallet);
}
});

View File

@ -92,7 +92,7 @@ angular.module('copayApp.services')
});
w.on('ready', function(myPeerID) {
$scope.loading = false;
$rootScope.wallet = w;
//$rootScope.wallet = w;
if ($rootScope.initialConnection) {
$rootScope.initialConnection = false;
if ($rootScope.pendingPayment) {

View File

@ -41,11 +41,12 @@
</div>
<a class="size-12 wallet-item" ng-click="switchWallet(item.id)">
<p class="m0 size-14">{{item.name || item.id}} </p>
<span ng-if="item.balanceInfo.updatingBalance"><i class="fi-bitcoin-circle icon-rotate spinner"></i></span>
<span ng-if="!item.balanceInfo.updatingBalance" data-options="disable_for_touch:true">
<span ng-if="item.isReady() && item.balanceInfo.updatingBalance"><i class="fi-bitcoin-circle icon-rotate spinner"></i></span>
<span ng-if="item.isReady() && !item.balanceInfo.updatingBalance" data-options="disable_for_touch:true">
<b class="m5r">{{item.balanceInfo.totalBalance || 0 |noFractionNumber}} {{item.settings.unitName}}</b>
<span class="alt-currency">{{item.balanceInfo.totalBalanceAlternative |noFractionNumber:2}} {{item.balanceInfo.alternativeIsoCode}}</span>
</span>
<span ng-if="!item.isReady()">Waiting for copayers...</span>
</a>
</li>
</ul>