aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/tx-utils-test.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-04-01 08:57:47 +0800
committerkumavis <aaron@kumavis.me>2017-04-01 08:57:47 +0800
commit810f5881f6ad9fea9bcb25ea1ccaf9cdeb2c744f (patch)
tree7f308e9d60328d5ceb65503590d770fc5a2368f1 /test/unit/tx-utils-test.js
parent60a48e713fb341c0eba893bd0c37e02315c8b320 (diff)
parent0a5c634081656c9450d4341b96bab6b4134a0b7a (diff)
downloadtangerine-wallet-browser-810f5881f6ad9fea9bcb25ea1ccaf9cdeb2c744f.tar
tangerine-wallet-browser-810f5881f6ad9fea9bcb25ea1ccaf9cdeb2c744f.tar.gz
tangerine-wallet-browser-810f5881f6ad9fea9bcb25ea1ccaf9cdeb2c744f.tar.bz2
tangerine-wallet-browser-810f5881f6ad9fea9bcb25ea1ccaf9cdeb2c744f.tar.lz
tangerine-wallet-browser-810f5881f6ad9fea9bcb25ea1ccaf9cdeb2c744f.tar.xz
tangerine-wallet-browser-810f5881f6ad9fea9bcb25ea1ccaf9cdeb2c744f.tar.zst
tangerine-wallet-browser-810f5881f6ad9fea9bcb25ea1ccaf9cdeb2c744f.zip
Merge branch 'master' of github.com:MetaMask/metamask-plugin into platform
Diffstat (limited to 'test/unit/tx-utils-test.js')
-rw-r--r--test/unit/tx-utils-test.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/unit/tx-utils-test.js b/test/unit/tx-utils-test.js
index 8b4d2f059..93e9e4134 100644
--- a/test/unit/tx-utils-test.js
+++ b/test/unit/tx-utils-test.js
@@ -12,6 +12,23 @@ describe('txUtils', function() {
txUtils = new TxUtils()
})
+ describe('chain Id', function() {
+ it('prepares a transaction with the provided chainId', function() {
+ const txParams = {
+ to: '0x70ad465e0bab6504002ad58c744ed89c7da38524',
+ from: '0x69ad465e0bab6504002ad58c744ed89c7da38525',
+ value: '0x0',
+ gas: '0x7b0c',
+ gasPrice: '0x199c82cc00',
+ data: '0x',
+ nonce: '0x3',
+ chainId: 42,
+ }
+ const ethTx = txUtils.buildEthTxFromParams(txParams)
+ assert.equal(ethTx.getChainId(), 42, 'chainId is set from tx params')
+ })
+ })
+
describe('addGasBuffer', function() {
it('multiplies by 1.5, when within block gas limit', function() {
// naive estimatedGas: 0x16e360 (1.5 mil)