open wallet working
This commit is contained in:
parent
65cbf5b46a
commit
341c9d8ffa
6 changed files with 54 additions and 12 deletions
|
|
@ -7,6 +7,8 @@ angular.module('copay.signin').controller('SigninController',
|
|||
// $rootScope.peerId = peerData ? peerData.peerId : null;
|
||||
$scope.loading = false;
|
||||
|
||||
$scope.selectedWalletId = false;
|
||||
|
||||
$scope.listWalletIds = function() {
|
||||
return copay.Wallet.factory.getWalletIds();
|
||||
};
|
||||
|
|
@ -23,12 +25,20 @@ angular.module('copay.signin').controller('SigninController',
|
|||
|
||||
$scope.open = function(walletId) {
|
||||
$scope.loading = true;
|
||||
if (Network.openWallet(walletId)) {
|
||||
|
||||
Network.openWallet(walletId);
|
||||
|
||||
if ($rootScope.wallet && $rootScope.wallet.id) {
|
||||
Network.init(function() {
|
||||
$location.path('peer');
|
||||
$rootScope.$digest();
|
||||
});
|
||||
}
|
||||
else {
|
||||
$scope.loading = false;
|
||||
$rootScope.flashMessage = {type:'error', message: 'Wallet not found'};
|
||||
$location.path('signin');
|
||||
}
|
||||
};
|
||||
|
||||
$scope.join = function(cid) {
|
||||
|
|
|
|||
|
|
@ -23,5 +23,5 @@ angular.module('copay.transactions').controller('TransactionsController',
|
|||
}
|
||||
];
|
||||
|
||||
$scope.txsoutput = $rootScope.wallet.txProposals.txps;
|
||||
$scope.txsoutput = $rootScope.wallet.getTxProposals();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue