Skip to content

Commit

Permalink
Merge pull request #377 from cmgustavo/feature/fee-constant
Browse files Browse the repository at this point in the history
Exporting a constant on TransactionBuilder for use on Copay
  • Loading branch information
Ryan X. Charles committed Jun 11, 2014
2 parents 2b7fb8a + 1d957b2 commit 772b12e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/TransactionBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ function TransactionBuilder(opts) {
return this;
}

TransactionBuilder.FEE_PER_1000B_SAT = FEE_PER_1000B_SAT;

/*
* scriptForAddress
*
Expand Down
6 changes: 4 additions & 2 deletions test/test.TransactionBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ var vopts = {
dontVerifyStrictEnc: true
};



describe('TransactionBuilder', function() {
it('should initialze the main object', function() {
should.exist(TransactionBuilder);
Expand All @@ -40,6 +38,10 @@ describe('TransactionBuilder', function() {
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 t = new TransactionBuilder({spendUnconfirmed: spendUnconfirmed})
Expand Down

0 comments on commit 772b12e

Please sign in to comment.