|
@ -2211,7 +2211,8 @@ describe('Wallet service', function() { |
|
|
var server, wallet, levels; |
|
|
var server, wallet, levels; |
|
|
before(function() { |
|
|
before(function() { |
|
|
levels = Defaults.FEE_LEVELS; |
|
|
levels = Defaults.FEE_LEVELS; |
|
|
Defaults.FEE_LEVELS = [{ |
|
|
Defaults.FEE_LEVELS = { |
|
|
|
|
|
btc: [{ |
|
|
name: 'urgent', |
|
|
name: 'urgent', |
|
|
nbBlocks: 1, |
|
|
nbBlocks: 1, |
|
|
multiplier: 1.5, |
|
|
multiplier: 1.5, |
|
@ -2232,7 +2233,8 @@ describe('Wallet service', function() { |
|
|
name: 'superEconomy', |
|
|
name: 'superEconomy', |
|
|
nbBlocks: 24, |
|
|
nbBlocks: 24, |
|
|
defaultValue: 10000 |
|
|
defaultValue: 10000 |
|
|
}]; |
|
|
}] |
|
|
|
|
|
}; |
|
|
}); |
|
|
}); |
|
|
after(function() { |
|
|
after(function() { |
|
|
Defaults.FEE_LEVELS = levels; |
|
|
Defaults.FEE_LEVELS = levels; |
|
@ -2281,7 +2283,7 @@ describe('Wallet service', function() { |
|
|
fees = _.zipObject(_.map(fees, function(item) { |
|
|
fees = _.zipObject(_.map(fees, function(item) { |
|
|
return [item.level, item.feePerKb]; |
|
|
return [item.level, item.feePerKb]; |
|
|
})); |
|
|
})); |
|
|
var defaults = _.zipObject(_.map(Defaults.FEE_LEVELS, function(item) { |
|
|
var defaults = _.zipObject(_.map(Defaults.FEE_LEVELS['btc'], function(item) { |
|
|
return [item.name, item.defaultValue]; |
|
|
return [item.name, item.defaultValue]; |
|
|
})); |
|
|
})); |
|
|
fees.priority.should.equal(defaults.priority); |
|
|
fees.priority.should.equal(defaults.priority); |
|
@ -2344,7 +2346,7 @@ describe('Wallet service', function() { |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
it('should get monotonically decreasing fee values', function(done) { |
|
|
it('should get monotonically decreasing fee values', function(done) { |
|
|
_.find(Defaults.FEE_LEVELS, { |
|
|
_.find(Defaults.FEE_LEVELS['btc'], { |
|
|
nbBlocks: 6 |
|
|
nbBlocks: 6 |
|
|
}).defaultValue.should.equal(25000); |
|
|
}).defaultValue.should.equal(25000); |
|
|
helpers.stubFeeLevels({ |
|
|
helpers.stubFeeLevels({ |
|
|