From 502011019a028258305abcb415cdba1b2530b5ad Mon Sep 17 00:00:00 2001 From: kumavis Date: Wed, 4 Apr 2018 08:59:03 -0700 Subject: [PATCH 1/2] tx - txParams - allow chainId to be a hex string --- app/scripts/lib/tx-state-manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/lib/tx-state-manager.js b/app/scripts/lib/tx-state-manager.js index 9e597ef37..2ab24d6a0 100644 --- a/app/scripts/lib/tx-state-manager.js +++ b/app/scripts/lib/tx-state-manager.js @@ -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})`) From 6be7365dd1d41a455daf8963a35d9f75a76e9e9d Mon Sep 17 00:00:00 2001 From: kumavis Date: Wed, 4 Apr 2018 09:01:19 -0700 Subject: [PATCH 2/2] changelog - add note on txParams.chainId validation change --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 479e422f2..20651dbad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Current Master +- Fix overly strict validation where transactions were rejected with hex encoded "chainId" + ## 4.5.1 Tue Apr 03 2018 - Fix default network (should be mainnet not Rinkeby)