From 97960191179d6fd50a00c375785e137d71a46f5e Mon Sep 17 00:00:00 2001 From: Ian Macalinao Date: Mon, 28 Nov 2022 18:32:16 -0600 Subject: [PATCH] fix: remove Buffer from transaction signature verification (#27868) --- web3.js/src/transaction/legacy.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web3.js/src/transaction/legacy.ts b/web3.js/src/transaction/legacy.ts index c2daec2eb4cb8c..802a1a2ad0058b 100644 --- a/web3.js/src/transaction/legacy.ts +++ b/web3.js/src/transaction/legacy.ts @@ -699,14 +699,17 @@ export class Transaction { /** * @internal */ - _verifySignatures(signData: Buffer, requireAllSignatures: boolean): boolean { + _verifySignatures( + signData: Uint8Array, + requireAllSignatures: boolean, + ): boolean { for (const {signature, publicKey} of this.signatures) { if (signature === null) { if (requireAllSignatures) { return false; } } else { - if (!verify(signature, signData, publicKey.toBuffer())) { + if (!verify(signature, signData, publicKey.toBytes())) { return false; } }