Skip to content

Commit ec071d6

Browse files
authored
Fix ethereum_signature_verify_works test (#54)
* remove debug console.log * fix ethereum verify test
1 parent 3ff79d0 commit ec071d6

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/instance.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,6 @@ export class VMInstance {
350350
// Verifies message hashes against a signature with a public key, using the secp256k1 ECDSA parametrization.
351351
// Returns 0 on verification success, 1 on verification failure
352352
do_secp256k1_verify(hash: Region, signature: Region, pubkey: Region): number {
353-
console.log(
354-
`signature length: ${signature.str.length}, pubkey length: ${pubkey.str.length}, message length: ${hash.str.length}`
355-
);
356353
const isValidSignature = ecdsaVerify(
357354
signature.data,
358355
hash.data,

test/integration/crypto-verify.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,9 @@ describe('crypto-verify', () => {
115115

116116
it('ethereum_signature_verify_works', async () => {
117117
vm.instantiate(mockEnv, mockInfo, {});
118-
119118
const verify_msg = {
120119
verify_ethereum_text: {
121-
message: convertStringToBase64(testData.ETHEREUM_MESSAGE),
120+
message: testData.ETHEREUM_MESSAGE,
122121
signature: convertHexToBase64(testData.ETHEREUM_SIGNATURE_HEX),
123122
signer_address: testData.ETHEREUM_SIGNER_ADDRESS,
124123
}

0 commit comments

Comments
 (0)