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:
parent
9930f5996c
commit
502011019a
@ -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})`)
|
||||
|
Loading…
Reference in New Issue
Block a user