1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

tx - txParams - allow chainId to be a hex string

This commit is contained in:
kumavis 2018-04-04 08:59:03 -07:00
parent 9930f5996c
commit 502011019a

View File

@ -143,7 +143,7 @@ module.exports = class TransactionStateManager extends EventEmitter {
// validate types
switch (key) {
case 'chainId':
if (typeof value !== 'number') throw new Error(`${key} in txParams is not a Number. got: (${value})`)
if (typeof value !== 'number' && typeof value !== 'string') throw new Error(`${key} in txParams is not a Number or hex string. got: (${value})`)
break
default:
if (typeof value !== 'string') throw new Error(`${key} in txParams is not a string. got: (${value})`)