aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-04-06 06:06:29 +0800
committerGitHub <noreply@github.com>2018-04-06 06:06:29 +0800
commit741c6097a2cead5447da8af7e5f9dae71740eb5c (patch)
tree9079a6cc6d73d719f9b1c6a98fb85763efaf4bf7 /test
parent2dfa8a2e5049c21b30f6b70d06d0cfd56097904a (diff)
parentc02da0f27ca4a4239ebae4cfd3348a656e258b86 (diff)
downloadtangerine-wallet-browser-741c6097a2cead5447da8af7e5f9dae71740eb5c.tar
tangerine-wallet-browser-741c6097a2cead5447da8af7e5f9dae71740eb5c.tar.gz
tangerine-wallet-browser-741c6097a2cead5447da8af7e5f9dae71740eb5c.tar.bz2
tangerine-wallet-browser-741c6097a2cead5447da8af7e5f9dae71740eb5c.tar.lz
tangerine-wallet-browser-741c6097a2cead5447da8af7e5f9dae71740eb5c.tar.xz
tangerine-wallet-browser-741c6097a2cead5447da8af7e5f9dae71740eb5c.tar.zst
tangerine-wallet-browser-741c6097a2cead5447da8af7e5f9dae71740eb5c.zip
Merge pull request #3887 from MetaMask/i#3886
transactions - remove unnecessary keys on txParams
Diffstat (limited to 'test')
-rw-r--r--test/unit/tx-controller-test.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/unit/tx-controller-test.js b/test/unit/tx-controller-test.js
index 3fec9758f..824574ff2 100644
--- a/test/unit/tx-controller-test.js
+++ b/test/unit/tx-controller-test.js
@@ -239,19 +239,20 @@ describe('Transaction Controller', function () {
from: 'a7df1beDBF813f57096dF77FCd515f0B3900e402',
to: null,
data: '68656c6c6f20776f726c64',
+ random: 'hello world',
}
- txController._normalizeTxParams(txParams)
+ let normalizedTxParams = txController._normalizeTxParams(txParams)
- assert(!txParams.chainId, 'their should be no chainId')
- assert(!txParams.to, 'their should be no to address if null')
- assert.equal(txParams.from.slice(0, 2), '0x', 'from should be hexPrefixd')
- assert.equal(txParams.data.slice(0, 2), '0x', 'data should be hexPrefixd')
+ assert(!normalizedTxParams.chainId, 'their should be no chainId')
+ assert(!normalizedTxParams.to, 'their should be no to address if null')
+ assert.equal(normalizedTxParams.from.slice(0, 2), '0x', 'from should be hexPrefixd')
+ assert.equal(normalizedTxParams.data.slice(0, 2), '0x', 'data should be hexPrefixd')
+ assert(!('random' in normalizedTxParams), 'their should be no random key in normalizedTxParams')
txParams.to = 'a7df1beDBF813f57096dF77FCd515f0B3900e402'
-
- txController._normalizeTxParams(txParams)
- assert.equal(txParams.to.slice(0, 2), '0x', 'to should be hexPrefixd')
+ normalizedTxParams = txController._normalizeTxParams(txParams)
+ assert.equal(normalizedTxParams.to.slice(0, 2), '0x', 'to should be hexPrefixd')
})
})