use payments in integration tests
This commit is contained in:
parent
38efc35fdf
commit
256656f766
5 changed files with 63 additions and 93 deletions
test/integration
|
@ -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 () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue