Changes to new version-less ECKey API

This commit is contained in:
Daniel Cousens 2014-03-22 18:17:54 +11:00
parent a1be488d1b
commit b40374e332
9 changed files with 61 additions and 85 deletions

View file

@ -291,11 +291,11 @@ var ECDSA = {
*/
calcPubkeyRecoveryParam: function (origPubkey, r, s, hash)
{
var address = origPubkey.getBitcoinAddress().toString();
var address = origPubkey.getAddress().toString();
for (var i = 0; i < 4; i++) {
var pubkey = ECDSA.recoverPubKey(r, s, hash, i);
pubkey.compressed = origPubkey.compressed;
if (pubkey.getBitcoinAddress().toString() == address) {
if (pubkey.getAddress().toString() == address) {
return i;
}
}