diff options
author | kumavis <kumavis@users.noreply.github.com> | 2018-03-30 04:57:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-30 04:57:43 +0800 |
commit | 971204eb06a80f3e4dfea9dcc4f34faf06de8923 (patch) | |
tree | 7c99679f2df4fb6cedf1ec9ad0fa21dae705a3d0 /app/scripts/controllers/transactions.js | |
parent | 552fb1fabecd2f2de0c500aeee2fe633e69e7f5a (diff) | |
parent | 9ec42a87b3d7cf669082c046c5acbd1bc0f5f747 (diff) | |
download | tangerine-wallet-browser-971204eb06a80f3e4dfea9dcc4f34faf06de8923.tar tangerine-wallet-browser-971204eb06a80f3e4dfea9dcc4f34faf06de8923.tar.gz tangerine-wallet-browser-971204eb06a80f3e4dfea9dcc4f34faf06de8923.tar.bz2 tangerine-wallet-browser-971204eb06a80f3e4dfea9dcc4f34faf06de8923.tar.lz tangerine-wallet-browser-971204eb06a80f3e4dfea9dcc4f34faf06de8923.tar.xz tangerine-wallet-browser-971204eb06a80f3e4dfea9dcc4f34faf06de8923.tar.zst tangerine-wallet-browser-971204eb06a80f3e4dfea9dcc4f34faf06de8923.zip |
Merge branch 'master' into e2e-selector
Diffstat (limited to 'app/scripts/controllers/transactions.js')
-rw-r--r-- | app/scripts/controllers/transactions.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index 3e3909361..7e2cc15da 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -250,7 +250,7 @@ module.exports = class TransactionController extends EventEmitter { // wait for a nonce nonceLock = await this.nonceTracker.getNonceLock(fromAddress) // add nonce to txParams - // if txMeta has lastGasPrice then it is a retry at same nonce with higher + // if txMeta has lastGasPrice then it is a retry at same nonce with higher // gas price transaction and their for the nonce should not be calculated const nonce = txMeta.lastGasPrice ? txMeta.txParams.nonce : nonceLock.nextNonce txMeta.txParams.nonce = ethUtil.addHexPrefix(nonce.toString(16)) @@ -273,12 +273,14 @@ module.exports = class TransactionController extends EventEmitter { async signTransaction (txId) { const txMeta = this.txStateManager.getTx(txId) - const txParams = txMeta.txParams - const fromAddress = txParams.from // add network/chain id - txParams.chainId = ethUtil.addHexPrefix(this.getChainId().toString(16)) + const chainId = this.getChainId() + const txParams = Object.assign({}, txMeta.txParams, { chainId }) + // sign tx + const fromAddress = txParams.from const ethTx = new Transaction(txParams) await this.signEthTx(ethTx, fromAddress) + // set state to signed this.txStateManager.setTxStatusSigned(txMeta.id) const rawTx = ethUtil.bufferToHex(ethTx.serialize()) return rawTx |