Exporting a constant on TransactionBuilder for use on Copay (to check available funds to spend). A simple test for this.

This commit is contained in:
Gustavo Cortez 2014-06-11 19:00:11 -03:00
parent 2dac2b1f47
commit 1d957b24d9
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})