aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2018-04-05 11:18:44 +0800
committerfrankiebee <frankie.diamond@gmail.com>2018-04-05 13:29:43 +0800
commit343f0e9e80af804f256a5fa1a55b136c8241c368 (patch)
treefa82e5e3741e3a39095afcaf15ab52b65dab6e7c /app/scripts
parent1153120fe84e9d4cde47a7e416028be0fec3c61c (diff)
downloadtangerine-wallet-browser-343f0e9e80af804f256a5fa1a55b136c8241c368.tar
tangerine-wallet-browser-343f0e9e80af804f256a5fa1a55b136c8241c368.tar.gz
tangerine-wallet-browser-343f0e9e80af804f256a5fa1a55b136c8241c368.tar.bz2
tangerine-wallet-browser-343f0e9e80af804f256a5fa1a55b136c8241c368.tar.lz
tangerine-wallet-browser-343f0e9e80af804f256a5fa1a55b136c8241c368.tar.xz
tangerine-wallet-browser-343f0e9e80af804f256a5fa1a55b136c8241c368.tar.zst
tangerine-wallet-browser-343f0e9e80af804f256a5fa1a55b136c8241c368.zip
transactions - remove unnecessary keys on txParams
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/controllers/transactions.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js
index a73a8b36d..0b78d62f1 100644
--- a/app/scripts/controllers/transactions.js
+++ b/app/scripts/controllers/transactions.js
@@ -315,6 +315,18 @@ module.exports = class TransactionController extends EventEmitter {
//
_normalizeTxParams (txParams) {
+ const acceptableKeys = [
+ 'from',
+ 'to',
+ 'nonce',
+ 'value',
+ 'data',
+ 'gas',
+ 'gasPrice',
+ ]
+ Object.keys(txParams).forEach((key) => {
+ if (!acceptableKeys.includes(key)) delete txParams[key]
+ })
delete txParams.chainId
if ( !txParams.to ) {