Browse Source

Merge pull request #377 from cmgustavo/feature/fee-constant

Exporting a constant on TransactionBuilder for use on Copay
patch-2
Ryan X. Charles 11 years ago
parent
commit
772b12e471
  1. 2
      lib/TransactionBuilder.js
  2. 6
      test/test.TransactionBuilder.js

2
lib/TransactionBuilder.js

@ -114,6 +114,8 @@ function TransactionBuilder(opts) {
return this; return this;
} }
TransactionBuilder.FEE_PER_1000B_SAT = FEE_PER_1000B_SAT;
/* /*
* scriptForAddress * scriptForAddress
* *

6
test/test.TransactionBuilder.js

@ -19,8 +19,6 @@ var vopts = {
dontVerifyStrictEnc: true dontVerifyStrictEnc: true
}; };
describe('TransactionBuilder', function() { describe('TransactionBuilder', function() {
it('should initialze the main object', function() { it('should initialze the main object', function() {
should.exist(TransactionBuilder); should.exist(TransactionBuilder);
@ -40,6 +38,10 @@ describe('TransactionBuilder', function() {
t.lockTime.should.equal(10); t.lockTime.should.equal(10);
}); });
it('should be a fee in satoshi', function() {
var satoshi = TransactionBuilder.FEE_PER_1000B_SAT;
satoshi.should.equal(10000);
});
var getBuilder = function (spendUnconfirmed) { var getBuilder = function (spendUnconfirmed) {
var t = new TransactionBuilder({spendUnconfirmed: spendUnconfirmed}) var t = new TransactionBuilder({spendUnconfirmed: spendUnconfirmed})

Loading…
Cancel
Save