Browse Source

fix notify order

activeAddress
Matias Alejo Garcia 10 years ago
parent
commit
94becc8960
  1. 7
      lib/server.js

7
lib/server.js

@ -891,9 +891,8 @@ WalletService.prototype.removePendingTx = function(opts, cb) {
if (deleteLockTime > 0) {
return cb(new ClientError('TXCANNOTREMOVE', 'Cannot remove this tx proposal during locktime. Time remaining:' + deleteLockTime));
}
self._notify('TxProposalRemoved', {}, function() {
self.storage.removeTx(self.walletId, txp.id, cb);
self.storage.removeTx(self.walletId, txp.id, function() {
self._notify('TxProposalRemoved', {}, cb);
});
});
});
@ -1120,7 +1119,7 @@ WalletService.prototype.getPendingTxs = function(opts, cb) {
self.storage.fetchPendingTxs(self.walletId, function(err, txps) {
if (err) return cb(err);
_.each(txps,function(txp){
_.each(txps, function(txp) {
txp.deleteLockTime = self.getRemainingDeleteLockTime(txp);
});

Loading…
Cancel
Save