Browse Source

Merge pull request #25 from matiu/feat/locked-delete

add lock to removeWallet
activeAddress
Ivan Socolsky 10 years ago
parent
commit
11a7a65bc5
  1. 12
      lib/server.js

12
lib/server.js

@ -468,10 +468,18 @@ CopayServer.prototype.getTx = function(opts, cb) {
/**
* Remove wallet
* removeWallet
*
* @param opts
* @param cb
* @return {undefined}
*/
CopayServer.prototype.removeWallet = function(opts, cb) {
this.storage.removeWallet(this.walletId, cb);
var self = this;
Utils.runLocked(self.walletId, cb, function(cb) {
self.storage.removeWallet(self.walletId, cb);
});
};

Loading…
Cancel
Save