1
0
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:
kumavis 2018-04-04 09:09:59 -07:00 committed by GitHub
commit 75de380d65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -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})`)