Skip to content

Commit

Permalink
Fix ethereum_signature_verify_works test (#54)
Browse files Browse the repository at this point in the history
* remove debug console.log

* fix ethereum verify test
  • Loading branch information
Kiruse authored Oct 26, 2022
1 parent 3ff79d0 commit ec071d6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions src/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,6 @@ export class VMInstance {
// Verifies message hashes against a signature with a public key, using the secp256k1 ECDSA parametrization.
// Returns 0 on verification success, 1 on verification failure
do_secp256k1_verify(hash: Region, signature: Region, pubkey: Region): number {
console.log(
`signature length: ${signature.str.length}, pubkey length: ${pubkey.str.length}, message length: ${hash.str.length}`
);
const isValidSignature = ecdsaVerify(
signature.data,
hash.data,
Expand Down
3 changes: 1 addition & 2 deletions test/integration/crypto-verify.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,9 @@ describe('crypto-verify', () => {

it('ethereum_signature_verify_works', async () => {
vm.instantiate(mockEnv, mockInfo, {});

const verify_msg = {
verify_ethereum_text: {
message: convertStringToBase64(testData.ETHEREUM_MESSAGE),
message: testData.ETHEREUM_MESSAGE,
signature: convertHexToBase64(testData.ETHEREUM_SIGNATURE_HEX),
signer_address: testData.ETHEREUM_SIGNER_ADDRESS,
}
Expand Down

0 comments on commit ec071d6

Please sign in to comment.