Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #714 from EOSIO/shouldHash_to_jssignatureProvider
Browse files Browse the repository at this point in the history
Added false for shouldHash to sign() usages
  • Loading branch information
Brad Hart authored Apr 10, 2020
2 parents a6ad012 + f17764c commit b10b79d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/eosjs-jssig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class JsSignatureProvider implements SignatureProvider {
const publicKey = PublicKey.fromString(key);
const ellipticPrivateKey = this.keys.get(convertLegacyPublicKey(key));
const privateKey = PrivateKey.fromElliptic(ellipticPrivateKey, publicKey.getType());
const signature = privateKey.sign(digest);
const signature = privateKey.sign(digest, false);
signatures.push(signature.toString());
}

Expand Down
6 changes: 4 additions & 2 deletions src/tests/eosjs-jssig.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ describe('JsSignatureProvider', () => {
expect(
signature.verify(
digestFromSerializedData(chainId, serializedTransaction),
PublicKey.fromString(k1FormatPublicKeys[0])
PublicKey.fromString(k1FormatPublicKeys[0]),
false
)
).toEqual(true);
});
Expand Down Expand Up @@ -289,7 +290,8 @@ describe('JsSignatureProvider', () => {
expect(
signature.verify(
digestFromSerializedData(chainId, serializedTransaction),
PublicKey.fromString(r1FormatPublicKeys[0])
PublicKey.fromString(r1FormatPublicKeys[0]),
false
)
).toEqual(true);
});
Expand Down

0 comments on commit b10b79d

Please sign in to comment.