This commit is contained in:
Ivan Socolsky 2015-08-12 18:38:38 -03:00
parent f9a33c3c93
commit ad6102c7ce
1 changed files with 4 additions and 3 deletions

View File

@ -196,9 +196,10 @@ helpers.stubHistory = function(txs) {
helpers.stubFeeLevels = function(levels) {
blockchainExplorer.estimateFee = function(nbBlocks, cb) {
return cb(null, {
feePerKB: levels[nbBlocks] / 1e8
});
var result = _.zipObject(_.map(_.pick(levels, nbBlocks), function(fee, n) {
return [+n, fee > 0 ? fee / 1e8 : fee];
}));
return cb(null, result);
};
};