1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Add completed tx hash to persisted tx log

This commit is contained in:
Dan Finlay 2016-04-19 17:44:11 -07:00
parent f72887a0a2
commit b8c57433ce

View File

@ -337,6 +337,10 @@ function IdManagement(opts) {
txParams.gasLimit = ethUtil.addHexPrefix(txParams.gasLimit || txParams.gas) txParams.gasLimit = ethUtil.addHexPrefix(txParams.gasLimit || txParams.gas)
txParams.nonce = ethUtil.addHexPrefix(txParams.nonce) txParams.nonce = ethUtil.addHexPrefix(txParams.nonce)
var tx = new Transaction(txParams) var tx = new Transaction(txParams)
var hash = '0x' + tx.hash().toString('hex')
var txLog = configManager.getTxWithParams(txParams)
txLog.hash = hash
configManager.updateTx(txLog)
var rawTx = '0x'+tx.serialize().toString('hex') var rawTx = '0x'+tx.serialize().toString('hex')
return '0x'+LightwalletSigner.signTx(this.keyStore, this.derivedKey, rawTx, txParams.from, this.hdPathString) return '0x'+LightwalletSigner.signTx(this.keyStore, this.derivedKey, rawTx, txParams.from, this.hdPathString)
} }