Fix testnet address test

This commit is contained in:
junderw 2019-01-07 16:33:57 +09:00
parent f3d918a2cb
commit 1ed037025c
No known key found for this signature in database
GPG key ID: B256185D3A971908

View file

@ -95,8 +95,8 @@ describe('bitcoinjs-lib (addresses)', function () {
const keyPair = bitcoin.ECPair.makeRandom({ network: TESTNET }) const keyPair = bitcoin.ECPair.makeRandom({ network: TESTNET })
const { address } = bitcoin.payments.p2pkh({ pubkey: keyPair.publicKey, network: TESTNET }) const { address } = bitcoin.payments.p2pkh({ pubkey: keyPair.publicKey, network: TESTNET })
// bitcoin testnet P2PKH addresses start with a 'm' // bitcoin testnet P2PKH addresses start with a 'm' or 'n'
assert.strictEqual(address.startsWith('m'), true) assert.strictEqual(address.startsWith('m') || address.startsWith('n'), true)
}) })
it('can generate a Litecoin address', function () { it('can generate a Litecoin address', function () {