aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/transaction-manager.js
diff options
context:
space:
mode:
authorDan Finlay <flyswatter@users.noreply.github.com>2017-01-19 05:14:27 +0800
committerGitHub <noreply@github.com>2017-01-19 05:14:27 +0800
commit25e57939920d4685a20b4e7b3a14060e9d3314c7 (patch)
treefa3c5f2811912a18ce9811c5c850bb4ec25ffbb1 /app/scripts/transaction-manager.js
parent9ab7ce370bc12e10b3458c0755f0dd8488788bec (diff)
parent0e01abdf7154067ca50bf279340b868aefd8343f (diff)
downloadtangerine-wallet-browser-25e57939920d4685a20b4e7b3a14060e9d3314c7.tar
tangerine-wallet-browser-25e57939920d4685a20b4e7b3a14060e9d3314c7.tar.gz
tangerine-wallet-browser-25e57939920d4685a20b4e7b3a14060e9d3314c7.tar.bz2
tangerine-wallet-browser-25e57939920d4685a20b4e7b3a14060e9d3314c7.tar.lz
tangerine-wallet-browser-25e57939920d4685a20b4e7b3a14060e9d3314c7.tar.xz
tangerine-wallet-browser-25e57939920d4685a20b4e7b3a14060e9d3314c7.tar.zst
tangerine-wallet-browser-25e57939920d4685a20b4e7b3a14060e9d3314c7.zip
Merge pull request #1027 from MetaMask/Version-3.1.0v3.1.0
Version 3.1.0
Diffstat (limited to 'app/scripts/transaction-manager.js')
-rw-r--r--app/scripts/transaction-manager.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/scripts/transaction-manager.js b/app/scripts/transaction-manager.js
index cc9082394..6d0121afd 100644
--- a/app/scripts/transaction-manager.js
+++ b/app/scripts/transaction-manager.js
@@ -190,7 +190,7 @@ module.exports = class TransactionManager extends EventEmitter {
let fromAddress = txParams.from
let ethTx = this.txProviderUtils.buildEthTxFromParams(txParams, txMeta.gasMultiplier)
this.signEthTx(ethTx, fromAddress).then(() => {
- this.updateTxAsSigned(txMeta.id, ethTx)
+ this.setTxStatusSigned(txMeta.id)
cb(null, ethUtil.bufferToHex(ethTx.serialize()))
}).catch((err) => {
cb(err)
@@ -198,21 +198,20 @@ module.exports = class TransactionManager extends EventEmitter {
}
publishTransaction (txId, rawTx, cb) {
- this.txProviderUtils.publishTransaction(rawTx, (err) => {
+ this.txProviderUtils.publishTransaction(rawTx, (err, txHash) => {
if (err) return cb(err)
+ this.setTxHash(txId, txHash)
this.setTxStatusSubmitted(txId)
cb()
})
}
- // receives a signed tx object and updates the tx hash
- updateTxAsSigned (txId, ethTx) {
+ // receives a txHash records the tx as signed
+ setTxHash (txId, txHash) {
// Add the tx hash to the persisted meta-tx object
- let txHash = ethUtil.bufferToHex(ethTx.hash())
let txMeta = this.getTx(txId)
txMeta.hash = txHash
this.updateTx(txMeta)
- this.setTxStatusSigned(txMeta.id)
}
/*