mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #3868 from MetaMask/chainid-fix
tx - txParams - allow chainId to be a hex string
This commit is contained in:
commit
75de380d65
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
## Current Master
|
## Current Master
|
||||||
|
|
||||||
|
- Fix overly strict validation where transactions were rejected with hex encoded "chainId"
|
||||||
|
|
||||||
## 4.5.1 Tue Apr 03 2018
|
## 4.5.1 Tue Apr 03 2018
|
||||||
|
|
||||||
- Fix default network (should be mainnet not Rinkeby)
|
- Fix default network (should be mainnet not Rinkeby)
|
||||||
|
@ -143,7 +143,7 @@ module.exports = class TransactionStateManager extends EventEmitter {
|
|||||||
// validate types
|
// validate types
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'chainId':
|
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
|
break
|
||||||
default:
|
default:
|
||||||
if (typeof value !== 'string') throw new Error(`${key} in txParams is not a string. got: (${value})`)
|
if (typeof value !== 'string') throw new Error(`${key} in txParams is not a string. got: (${value})`)
|
||||||
|
Loading…
Reference in New Issue
Block a user