rm copayers first
This commit is contained in:
parent
b19d12157a
commit
1ab279ab15
|
@ -241,7 +241,7 @@ Storage.prototype._removeCopayers = function(walletId, cb) {
|
|||
var self = this;
|
||||
|
||||
this.fetchWallet(walletId, function(err, w) {
|
||||
if (err) return cb(err);
|
||||
if (err || !w) return cb(err);
|
||||
|
||||
self.db.batch(_.map(w.copayers, function(c) {
|
||||
return {
|
||||
|
@ -262,7 +262,9 @@ Storage.prototype.removeWallet = function(walletId, cb) {
|
|||
var self = this;
|
||||
|
||||
async.series([
|
||||
|
||||
function(next) {
|
||||
self._removeCopayers(walletId, next);
|
||||
},
|
||||
function(next) {
|
||||
self._removeAllAddresses(walletId, next);
|
||||
},
|
||||
|
@ -272,9 +274,6 @@ Storage.prototype.removeWallet = function(walletId, cb) {
|
|||
function(next) {
|
||||
self.removeAllTxs(walletId, next);
|
||||
},
|
||||
function(next) {
|
||||
self._removeCopayers(walletId, next);
|
||||
},
|
||||
function(next) {
|
||||
var ops = [{
|
||||
type: 'del',
|
||||
|
|
Loading…
Reference in New Issue