From 0c24bfe2f23f37473f920f56fc665767d9b6222a Mon Sep 17 00:00:00 2001 From: Leonard Tan Date: Mon, 11 Sep 2023 10:14:46 +0800 Subject: [PATCH] Update signingUtils.ts bug raised by Shy --- .../src/providers/signingProviders/signingUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/providers/ethereum-provider/src/providers/signingProviders/signingUtils.ts b/packages/providers/ethereum-provider/src/providers/signingProviders/signingUtils.ts index feee22db7..6dd553ace 100644 --- a/packages/providers/ethereum-provider/src/providers/signingProviders/signingUtils.ts +++ b/packages/providers/ethereum-provider/src/providers/signingProviders/signingUtils.ts @@ -82,7 +82,7 @@ async function personalSign(sign: (msgHash: Buffer, rawMsg?: Buffer) => Promise< const sig = await sign(msgHash, Buffer.concat([prefix, message])); let modifiedV = sig.v; if (modifiedV <= 1) { - modifiedV = modifiedV = 27; + modifiedV = modifiedV + 27; } const serialized = concatSig(toBuffer(modifiedV), sig.r, sig.s); return serialized;