Merge pull request #1575 from bitcoinjs/fixTestSortPubkey

Actually sort pubkeys in test
This commit is contained in:
Jonathan Underwood 2020-06-01 16:14:53 +09:00 committed by GitHub
commit 7622c58365
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -649,7 +649,7 @@ function createPayment(_type: string, myKeys?: any[], network?: any): any {
if (type.slice(0, 4) === 'p2ms') {
payment = bitcoin.payments.p2ms({
m,
pubkeys: keys.map(key => key.publicKey).sort(),
pubkeys: keys.map(key => key.publicKey).sort((a, b) => a.compare(b)),
network,
});
} else if (['p2sh', 'p2wsh'].indexOf(type) > -1) {