Fix testnet address test
This commit is contained in:
parent
f3d918a2cb
commit
1ed037025c
1 changed files with 2 additions and 2 deletions
|
@ -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 () {
|
||||||
|
|
Loading…
Reference in a new issue