diff options
author | frankiebee <frankie.diamond@gmail.com> | 2018-04-04 03:14:30 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2018-04-04 03:17:53 +0800 |
commit | 3b1e4c74f5c8d503184a75584dca570187a13b8c (patch) | |
tree | 876f79cc380f2c6ecbcfaa0ac62b9e09623873a2 /app/scripts/lib | |
parent | 11d4f3200eb68033c11aa6a57fc6e0ef2d019076 (diff) | |
download | tangerine-wallet-browser-3b1e4c74f5c8d503184a75584dca570187a13b8c.tar tangerine-wallet-browser-3b1e4c74f5c8d503184a75584dca570187a13b8c.tar.gz tangerine-wallet-browser-3b1e4c74f5c8d503184a75584dca570187a13b8c.tar.bz2 tangerine-wallet-browser-3b1e4c74f5c8d503184a75584dca570187a13b8c.tar.lz tangerine-wallet-browser-3b1e4c74f5c8d503184a75584dca570187a13b8c.tar.xz tangerine-wallet-browser-3b1e4c74f5c8d503184a75584dca570187a13b8c.tar.zst tangerine-wallet-browser-3b1e4c74f5c8d503184a75584dca570187a13b8c.zip |
transactions - dont throw if chain id is not a string
Diffstat (limited to 'app/scripts/lib')
-rw-r--r-- | app/scripts/lib/tx-state-manager.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/scripts/lib/tx-state-manager.js b/app/scripts/lib/tx-state-manager.js index 23c915a61..3577d45d0 100644 --- a/app/scripts/lib/tx-state-manager.js +++ b/app/scripts/lib/tx-state-manager.js @@ -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') }) } |