Merge pull request #1756 from cmgustavo/feature/manage-wallets
Manage wallets
This commit is contained in:
commit
1753e315c1
8 changed files with 94 additions and 21 deletions
|
|
@ -359,13 +359,12 @@ angular.module('copayApp.services')
|
|||
$rootScope.pendingTxCount = res.pendingForUs;
|
||||
};
|
||||
|
||||
root.deleteWallet = function($scope, w) {
|
||||
w = w || $rootScope.wallet;
|
||||
root.deleteWallet = function($scope, w, cb) {
|
||||
if (!w) return root.onErrorDigest();
|
||||
var name = w.getName();
|
||||
$rootScope.iden.deleteWallet(w.id, function() {
|
||||
notification.info('Wallet deleted', $filter('translate')('Wallet deleted'));
|
||||
$rootScope.wallet = null;
|
||||
var lastFocused = $rootScope.iden.getLastFocusedWallet();
|
||||
root.bindProfile($scope, $rootScope.iden, lastFocused);
|
||||
notification.info(name + ' deleted', $filter('translate')('This wallet was deleted'));
|
||||
return cb();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue