Merge pull request #2039 from matiu/bug/walletbar
reuse changeWallet on walletbar
This commit is contained in:
commit
bbd3343ca1
3 changed files with 5 additions and 11 deletions
|
|
@ -4,12 +4,6 @@ angular.module('copayApp.controllers').controller('HomeWalletController', functi
|
||||||
$scope.init = function() {
|
$scope.init = function() {
|
||||||
$rootScope.title = 'Home';
|
$rootScope.title = 'Home';
|
||||||
|
|
||||||
// fix for Safari and mobile devices
|
|
||||||
var walletId = $location.hash();
|
|
||||||
if (walletId) {
|
|
||||||
$location.hash('');
|
|
||||||
identityService.setFocusedWallet(walletId);
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.rateService = rateService;
|
$scope.rateService = rateService;
|
||||||
$scope.isRateAvailable = false;
|
$scope.isRateAvailable = false;
|
||||||
|
|
|
||||||
|
|
@ -27,18 +27,18 @@ angular.module('copayApp.services')
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO should be on 'walletService'
|
// TODO should be on 'walletService' or 'go'
|
||||||
root.goWalletHome = function() {
|
root.goWalletHome = function() {
|
||||||
var w = $rootScope.wallet;
|
var w = $rootScope.wallet;
|
||||||
if (w) {
|
if (w) {
|
||||||
$rootScope.starting = false;
|
$rootScope.starting = false;
|
||||||
if (!w.isComplete()) {
|
if (!w.isComplete()) {
|
||||||
$location.path('/copayers');
|
go.go('copayers');
|
||||||
} else {
|
} else {
|
||||||
if ($rootScope.pendingPayment) {
|
if ($rootScope.pendingPayment) {
|
||||||
$location.path('paymentIntent');
|
go.go('paymentIntent');
|
||||||
} else {
|
} else {
|
||||||
$location.path('homeWallet');
|
go.go('homeWallet');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
<div class="avatar-wallet">{{(item.name || item.id) | limitTo: 1}}</div>
|
<div class="avatar-wallet">{{(item.name || item.id) | limitTo: 1}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col2">
|
<div class="col2">
|
||||||
<a ng-click="$root.go('/homeWallet#{{item.id}}')" class="size-12 wallet-item">
|
<a ng-click="switchWallet(item.id)" class="size-12 wallet-item">
|
||||||
<div class="oh">
|
<div class="oh">
|
||||||
<div class="right size-10 type-wallet">
|
<div class="right size-10 type-wallet">
|
||||||
[ {{item.requiredCopayers}} of {{item.totalCopayers}} ]</div>
|
[ {{item.requiredCopayers}} of {{item.totalCopayers}} ]</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue