From 33849bfec6c8b7e078a8b55f441c180cf397f575 Mon Sep 17 00:00:00 2001 From: Alex Donesky Date: Tue, 24 Aug 2021 11:23:29 -0500 Subject: [PATCH] Fix issue with chainId comparison in sign typed message param validation (#11900) --- app/scripts/lib/typed-message-manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/lib/typed-message-manager.js b/app/scripts/lib/typed-message-manager.js index 63f371684..534ecf818 100644 --- a/app/scripts/lib/typed-message-manager.js +++ b/app/scripts/lib/typed-message-manager.js @@ -204,7 +204,7 @@ export default class TypedMessageManager extends EventEmitter { `Cannot sign messages for chainId "${chainId}", because MetaMask is switching networks.`, ); if (typeof chainId === 'string') { - chainId = parseInt(chainId, 16); + chainId = parseInt(chainId, chainId.startsWith('0x') ? 16 : 10); } assert.equal( chainId,