variable fee for "send all funds"
This commit is contained in:
parent
e01cf88a90
commit
1f9b9c8dca
7 changed files with 78 additions and 53 deletions
|
|
@ -1005,6 +1005,18 @@ describe('Wallet model', function() {
|
|||
});
|
||||
});
|
||||
|
||||
describe('#estimatedFee', function() {
|
||||
it('should calculate estimated fee', function() {
|
||||
var COIN = 100000000;
|
||||
Wallet.estimatedFee(1).should.equal(0.0001 * COIN);
|
||||
Wallet.estimatedFee(2).should.equal(0.0001 * COIN);
|
||||
Wallet.estimatedFee(3).should.equal(0.0002 * COIN);
|
||||
Wallet.estimatedFee(1000).should.equal(0.0245 * COIN);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
describe('#send', function() {
|
||||
it('should call this.network.send', function() {
|
||||
var w = cachedCreateW2();
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ describe('Insight model', function() {
|
|||
|
||||
sinon.stub(blockchain, "requestPost", function(url, data, cb) {
|
||||
url.should.be.equal('/api/tx/send');
|
||||
var res = {status: 200};
|
||||
var res = {statusCode: 200};
|
||||
var body = {txid: 1234};
|
||||
setTimeout(function() {
|
||||
cb(null, res, body);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue