Manage wallets
This commit is contained in:
parent
9e695863ed
commit
ca3e9005a7
5 changed files with 77 additions and 14 deletions
|
|
@ -12,4 +12,25 @@ angular.module('copayApp.controllers').controller('ManageController', function($
|
|||
$scope.backupPlainText = backupService.profileEncrypted($rootScope.iden);
|
||||
$scope.hideViewBackup = true;
|
||||
};
|
||||
|
||||
$scope.getWallets = function() {
|
||||
$scope.wallets = [];
|
||||
var wids = _.pluck($rootScope.iden.listWallets(), 'id');
|
||||
_.each(wids, function(wid) {
|
||||
var w = $rootScope.iden.getWalletById(wid);
|
||||
$scope.wallets.push(w);
|
||||
controllerUtils.updateBalance(w, function() {
|
||||
$rootScope.$digest();
|
||||
}, true);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.deleteWallet = function(w) {
|
||||
if (!w) return;
|
||||
$scope.loading = w.id;
|
||||
controllerUtils.deleteWallet($scope, w, function() {
|
||||
$scope.loading = false;
|
||||
$scope.getWallets();
|
||||
});
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue