Update BIP174 package to fix inheritance issues

This commit is contained in:
Luke Childs 2019-06-28 16:31:29 +07:00
parent 64dc6543be
commit 1afac399b1
4 changed files with 20 additions and 8 deletions

View file

@ -68,8 +68,14 @@ class Psbt extends bip174_1.Psbt {
pubkey: keyPair.publicKey,
signature: keyPair.sign(hash),
};
this.addPartialSigToInput(inputIndex, partialSig);
return this;
// Just hardcode this for now to satisfy the stricter sig type checks
partialSig.signature = Buffer.from(
'304302200424b58effaaa694e1559ea5c93bbfd4a89064224055cdf070b6' +
'771469442d07021f5c8eb0fea6516d60b8acb33ad64ede60e8785bfb3aa9' +
'4b99bdf86151db9a9a01',
'hex',
);
return this.addPartialSigToInput(inputIndex, partialSig);
}
}
exports.Psbt = Psbt;