aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2018-04-06 03:12:02 +0800
committerfrankiebee <frankie.diamond@gmail.com>2018-04-06 03:12:02 +0800
commitc02da0f27ca4a4239ebae4cfd3348a656e258b86 (patch)
treea9bc3a26a52d54e9f674dad1e27b53b0548140e9 /test
parent343f0e9e80af804f256a5fa1a55b136c8241c368 (diff)
downloadtangerine-wallet-browser-c02da0f27ca4a4239ebae4cfd3348a656e258b86.tar
tangerine-wallet-browser-c02da0f27ca4a4239ebae4cfd3348a656e258b86.tar.gz
tangerine-wallet-browser-c02da0f27ca4a4239ebae4cfd3348a656e258b86.tar.bz2
tangerine-wallet-browser-c02da0f27ca4a4239ebae4cfd3348a656e258b86.tar.lz
tangerine-wallet-browser-c02da0f27ca4a4239ebae4cfd3348a656e258b86.tar.xz
tangerine-wallet-browser-c02da0f27ca4a4239ebae4cfd3348a656e258b86.tar.zst
tangerine-wallet-browser-c02da0f27ca4a4239ebae4cfd3348a656e258b86.zip
transactions - _normalizeTxParams will now return a new object for txParams
Diffstat (limited to 'test')
-rw-r--r--test/unit/tx-controller-test.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/unit/tx-controller-test.js b/test/unit/tx-controller-test.js
index e552464cf..824574ff2 100644
--- a/test/unit/tx-controller-test.js
+++ b/test/unit/tx-controller-test.js
@@ -242,17 +242,17 @@ describe('Transaction Controller', function () {
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(!('random' in txParams), 'their should be no random key in txParams')
- txParams.to = 'a7df1beDBF813f57096dF77FCd515f0B3900e402'
+ 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')
- txController._normalizeTxParams(txParams)
- assert.equal(txParams.to.slice(0, 2), '0x', 'to should be hexPrefixd')
+ txParams.to = 'a7df1beDBF813f57096dF77FCd515f0B3900e402'
+ normalizedTxParams = txController._normalizeTxParams(txParams)
+ assert.equal(normalizedTxParams.to.slice(0, 2), '0x', 'to should be hexPrefixd')
})
})