mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
transactions - dont throw if chain id is not a string
This commit is contained in:
parent
11d4f3200e
commit
3b1e4c74f5
@ -140,8 +140,8 @@ module.exports = class TransactionStateManager extends EventEmitter {
|
||||
validateTxParams(txParams) {
|
||||
Object.keys(txParams).forEach((key) => {
|
||||
const value = txParams[key]
|
||||
if (typeof value !== 'string') throw new Error(`${key}: ${value} in txParams is not a string`)
|
||||
if (!ethUtil.isHexPrefixed(value)) throw new Error('is not hex prefixed, everything on txParams must be hex prefixed')
|
||||
if (typeof value !== 'string' && key !== 'chainId') throw new Error(`${key}: ${value} in txParams is not a string`)
|
||||
if (!ethUtil.isHexPrefixed(value) && key !== 'chainId') throw new Error('is not hex prefixed, everything on txParams must be hex prefixed')
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user