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

Exporting a constant on TransactionBuilder for use on Copay
This commit is contained in:
Ryan X. Charles 2014-06-11 15:38:50 -07:00
commit 772b12e471
2 changed files with 6 additions and 2 deletions

View File

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

View File

@ -19,8 +19,6 @@ var vopts = {
dontVerifyStrictEnc: true
};
describe('TransactionBuilder', function() {
it('should initialze the main object', function() {
should.exist(TransactionBuilder);
@ -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})