Fix issue with chainId comparison in sign typed message param validation (#11900)

feature/default_network_editable
Alex Donesky 3 years ago committed by GitHub
parent 0d63aa0402
commit 33849bfec6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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,

Loading…
Cancel
Save