use payments in integration tests

This commit is contained in:
Daniel Cousens 2018-06-27 13:54:47 +10:00
parent 38efc35fdf
commit 256656f766
5 changed files with 63 additions and 93 deletions
test/integration

View file

@ -5,12 +5,8 @@ const bip32 = require('bip32')
const bip39 = require('bip39')
const bitcoin = require('../../')
// TODO: remove
const baddress = bitcoin.address
const bcrypto = bitcoin.crypto
function getAddress (node, network) {
network = network || bitcoin.networks.bitcoin
return baddress.toBase58Check(bcrypto.hash160(node.publicKey), network.pubKeyHash)
return bitcoin.payments.p2pkh({ pubkey: node.publicKey, network }).address
}
describe('bitcoinjs-lib (BIP32)', function () {