mirror of https://github.com/BTCPrivate/copay.git
fix profile
This commit is contained in:
parent
1e013b1bb6
commit
436aeda1c3
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('HomeController', function($scope, $rootScope, $location, notification, identityService, Compatibility) {
|
||||
angular.module('copayApp.controllers').controller('HomeController', function($scope, $rootScope, $location, $timeout, notification, identityService, Compatibility) {
|
||||
// This is only for backwards compat, insight api should link to #!/confirmed directly
|
||||
if (getParam('confirmed')) {
|
||||
var hashIndex = window.location.href.indexOf('/?');
|
||||
|
@ -24,6 +24,7 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
|
|||
}
|
||||
$rootScope.starting = true;
|
||||
identityService.open(form.email.$modelValue, form.password.$modelValue, function(err, iden) {
|
||||
$rootScope.starting = false;
|
||||
if (err) {
|
||||
copay.logger.warn(err);
|
||||
if ((err.toString() || '').match('PNOTFOUND')) {
|
||||
|
@ -31,7 +32,6 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
|
|||
} else {
|
||||
$scope.error = 'Unknown error';
|
||||
}
|
||||
$rootScope.$digest()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -23,6 +23,12 @@ angular.module('copayApp.controllers').controller('ProfileController', function(
|
|||
});
|
||||
};
|
||||
|
||||
$scope.setWallets = function() {
|
||||
if (!$rootScope.iden) return;
|
||||
$scope.wallets=$rootScope.iden.listWallets();
|
||||
};
|
||||
|
||||
|
||||
$scope.downloadWalletBackup = function(w) {
|
||||
if (!w) return;
|
||||
backupService.walletDownload(w);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="backup" ng-controller="ProfileController">
|
||||
<div class="backup" ng-controller="ProfileController" ng-init="setWallets()">
|
||||
<div class="row hide-for-large-up">
|
||||
<div class="large-12 medium-12 small-12 columns">
|
||||
<h1>{{$root.title}}</h1>
|
||||
|
|
Loading…
Reference in New Issue