aboutsummaryrefslogtreecommitdiffstats
path: root/app
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 /app
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 'app')
-rw-r--r--app/scripts/transaction-manager.js20
1 files changed, 16 insertions, 4 deletions
diff --git a/app/scripts/transaction-manager.js b/app/scripts/transaction-manager.js
index a70159680..d7051b2cb 100644
--- a/app/scripts/transaction-manager.js
+++ b/app/scripts/transaction-manager.js
@@ -205,11 +205,23 @@ module.exports = class TransactionManager extends EventEmitter {
})
}
+ getChainId() {
+ const networkState = this.networkStore.getState()
+ const getChainId = parseInt(networkState.network)
+ if (Number.isNaN(getChainId)) {
+ return 0
+ } else {
+ return getChainId
+ }
+ }
+
signTransaction (txId, cb) {
- let txMeta = this.getTx(txId)
- let txParams = txMeta.txParams
- let fromAddress = txParams.from
- let ethTx = this.txProviderUtils.buildEthTxFromParams(txParams)
+ const txMeta = this.getTx(txId)
+ const txParams = txMeta.txParams
+ const fromAddress = txParams.from
+ // add network/chain id
+ txParams.chainId = this.getChainId()
+ const ethTx = this.txProviderUtils.buildEthTxFromParams(txParams)
this.signEthTx(ethTx, fromAddress).then(() => {
this.setTxStatusSigned(txMeta.id)
cb(null, ethUtil.bufferToHex(ethTx.serialize()))