tx list - bug fix - fixes #143

feature/default_network_editable
kumavis 9 years ago
parent 9b524b4f28
commit d562b86f7a
  1. 5
      app/scripts/background.js
  2. 14
      app/scripts/lib/idStore.js
  3. 2
      package.json

@ -131,7 +131,10 @@ function onRpcRequest(remoteStream, payload){
// console.log('MetaMaskPlugin - incoming payload:', payload) // console.log('MetaMaskPlugin - incoming payload:', payload)
provider.sendAsync(payload, function onPayloadHandled(err, response){ provider.sendAsync(payload, function onPayloadHandled(err, response){
// provider engine errors are included in response objects // provider engine errors are included in response objects
if (!payload.isMetamaskInternal) console.log('MetaMaskPlugin - RPC complete:', payload, '->', response) if (!payload.isMetamaskInternal) {
console.log('MetaMaskPlugin - RPC complete:', payload, '->', response)
if (response.error) console.error('Error in RPC response:\n'+response.error.message)
}
try { try {
remoteStream.write(response) remoteStream.write(response)
} catch (err) { } catch (err) {

@ -351,14 +351,20 @@ function IdManagement(opts) {
txParams.nonce = ethUtil.addHexPrefix(txParams.nonce) txParams.nonce = ethUtil.addHexPrefix(txParams.nonce)
var tx = new Transaction(txParams) var tx = new Transaction(txParams)
// sign tx
var privKeyHex = ethUtil.addHexPrefix(this.keyStore.exportPrivateKey(txParams.from, this.derivedKey, this.hdPathString))
var privKey = ethUtil.toBuffer(privKeyHex)
tx.sign(privKey)
// Add the tx hash to the persisted meta-tx object // Add the tx hash to the persisted meta-tx object
var hash = '0x' + tx.hash().toString('hex') var txHash = ethUtil.bufferToHex(tx.hash())
var metaTx = configManager.getTx(txParams.metamaskId) var metaTx = configManager.getTx(txParams.metamaskId)
metaTx.hash = hash metaTx.hash = txHash
configManager.updateTx(metaTx) configManager.updateTx(metaTx)
var rawTx = '0x'+tx.serialize().toString('hex') // return raw serialized tx
return '0x'+LightwalletSigner.signTx(this.keyStore, this.derivedKey, rawTx, txParams.from, this.hdPathString) var rawTx = ethUtil.bufferToHex(tx.serialize())
return rawTx
} }
this.getSeed = function(){ this.getSeed = function(){

@ -53,7 +53,7 @@
"three.js": "^0.73.2", "three.js": "^0.73.2",
"through2": "^2.0.1", "through2": "^2.0.1",
"web3": "^0.15.1", "web3": "^0.15.1",
"web3-provider-engine": "^7.5.0", "web3-provider-engine": "^7.6.1",
"xtend": "^4.0.1" "xtend": "^4.0.1"
}, },
"devDependencies": { "devDependencies": {

Loading…
Cancel
Save