Fix : callback the newHistory

This commit is contained in:
Jean-Baptiste Dominguez 2018-09-07 01:18:54 +09:00
commit 81852836dd

View file

@ -613,8 +613,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
return storageService.setTxHistory(historyToSave, walletId, function() { return storageService.setTxHistory(historyToSave, walletId, function() {
$log.debug('Tx History saved.'); $log.debug('Tx History saved.');
return cb(null, newHistory);
return cb();
}); });
}); });
}); });
@ -691,8 +690,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
return storageService.setTxHistory(historyToSave, walletId, function() { return storageService.setTxHistory(historyToSave, walletId, function() {
$log.debug('Tx History saved.'); $log.debug('Tx History saved.');
return cb(null, newHistory);
return cb();
}); });
}); });
}); });
@ -728,7 +726,6 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
}; };
root.getTx = function(wallet, txid, cb) { root.getTx = function(wallet, txid, cb) {
function finish(list) { function finish(list) {
var tx = lodash.find(list, { var tx = lodash.find(list, {
txid: txid txid: txid
@ -745,7 +742,6 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
limitTx: txid limitTx: txid
}, function(err, txHistory) { }, function(err, txHistory) {
if (err) return cb(err); if (err) return cb(err);
finish(txHistory); finish(txHistory);
}); });
} }