tests/txb: remove getAddress
This commit is contained in:
parent
a6f2cc2924
commit
4616d24016
1 changed files with 2 additions and 7 deletions
|
@ -1,8 +1,8 @@
|
|||
const { describe, it, beforeEach } = require('mocha')
|
||||
const assert = require('assert')
|
||||
const baddress = require('../src/address')
|
||||
const bcrypto = require('../src/crypto')
|
||||
const bscript = require('../src/script')
|
||||
const payments = require('../src/payments')
|
||||
|
||||
const ECPair = require('../src/ecpair')
|
||||
const Transaction = require('../src/transaction')
|
||||
|
@ -11,11 +11,6 @@ const NETWORKS = require('../src/networks')
|
|||
|
||||
const fixtures = require('./fixtures/transaction_builder')
|
||||
|
||||
// TODO: remove
|
||||
function getAddress (node) {
|
||||
return baddress.toBase58Check(bcrypto.hash160(node.publicKey), NETWORKS.bitcoin.pubKeyHash)
|
||||
}
|
||||
|
||||
function constructSign (f, txb) {
|
||||
const network = NETWORKS[f.network]
|
||||
const stages = f.stages && f.stages.concat()
|
||||
|
@ -251,7 +246,7 @@ describe('TransactionBuilder', function () {
|
|||
})
|
||||
|
||||
it('accepts an address string and value', function () {
|
||||
const address = getAddress(keyPair)
|
||||
const { address } = payments.p2pkh({ pubkey: keyPair.publicKey })
|
||||
const vout = txb.addOutput(address, 1000)
|
||||
assert.strictEqual(vout, 0)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue