mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge branch 'dev' into i715-AddImportMenu
This commit is contained in:
commit
b2c52f6b83
@ -190,7 +190,7 @@ module.exports = class TransactionManager extends EventEmitter {
|
|||||||
let fromAddress = txParams.from
|
let fromAddress = txParams.from
|
||||||
let ethTx = this.txProviderUtils.buildEthTxFromParams(txParams, txMeta.gasMultiplier)
|
let ethTx = this.txProviderUtils.buildEthTxFromParams(txParams, txMeta.gasMultiplier)
|
||||||
this.signEthTx(ethTx, fromAddress).then(() => {
|
this.signEthTx(ethTx, fromAddress).then(() => {
|
||||||
this.updateTxAsSigned(txMeta.id, ethTx)
|
this.setTxStatusSigned(txMeta.id)
|
||||||
cb(null, ethUtil.bufferToHex(ethTx.serialize()))
|
cb(null, ethUtil.bufferToHex(ethTx.serialize()))
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
cb(err)
|
cb(err)
|
||||||
@ -198,21 +198,20 @@ module.exports = class TransactionManager extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
publishTransaction (txId, rawTx, cb) {
|
publishTransaction (txId, rawTx, cb) {
|
||||||
this.txProviderUtils.publishTransaction(rawTx, (err) => {
|
this.txProviderUtils.publishTransaction(rawTx, (err, txHash) => {
|
||||||
if (err) return cb(err)
|
if (err) return cb(err)
|
||||||
|
this.setTxHash(txId, txHash)
|
||||||
this.setTxStatusSubmitted(txId)
|
this.setTxStatusSubmitted(txId)
|
||||||
cb()
|
cb()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// receives a signed tx object and updates the tx hash
|
// receives a txHash records the tx as signed
|
||||||
updateTxAsSigned (txId, ethTx) {
|
setTxHash (txId, txHash) {
|
||||||
// Add the tx hash to the persisted meta-tx object
|
// Add the tx hash to the persisted meta-tx object
|
||||||
let txHash = ethUtil.bufferToHex(ethTx.hash())
|
|
||||||
let txMeta = this.getTx(txId)
|
let txMeta = this.getTx(txId)
|
||||||
txMeta.hash = txHash
|
txMeta.hash = txHash
|
||||||
this.updateTx(txMeta)
|
this.updateTx(txMeta)
|
||||||
this.setTxStatusSigned(txMeta.id)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user