From 9b5f5fe585b8c897a0bb80b688fec74be684048f Mon Sep 17 00:00:00 2001 From: chaitanyapotti Date: Mon, 14 Sep 2020 15:23:24 +0800 Subject: [PATCH] Fix derviedKey Buffer in toV3 --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index be34ec3..4a753b4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -599,7 +599,7 @@ export default class Wallet { } const ciphertext = runCipherBuffer(cipher, this.privKey) - const mac = keccak256(Buffer.concat([derivedKey.slice(16, 32), Buffer.from(ciphertext)])) + const mac = keccak256(Buffer.concat([Buffer.from(derivedKey.slice(16, 32)), Buffer.from(ciphertext)])) return { version: 3,