mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #7 from MetaMask/rawtx_fix
Fix issue with raw transaction injection.
This commit is contained in:
commit
bdf262fb18
@ -71,7 +71,7 @@ IdentityStore.prototype.setSelectedAddress = function(address){
|
|||||||
|
|
||||||
IdentityStore.prototype.addUnconfirmedTransaction = function(txParams, cb){
|
IdentityStore.prototype.addUnconfirmedTransaction = function(txParams, cb){
|
||||||
var self = this
|
var self = this
|
||||||
|
|
||||||
var time = (new Date()).getTime()
|
var time = (new Date()).getTime()
|
||||||
var txId = createId()
|
var txId = createId()
|
||||||
self._currentState.unconfTxs[txId] = {
|
self._currentState.unconfTxs[txId] = {
|
||||||
@ -81,7 +81,7 @@ IdentityStore.prototype.addUnconfirmedTransaction = function(txParams, cb){
|
|||||||
status: 'unconfirmed',
|
status: 'unconfirmed',
|
||||||
}
|
}
|
||||||
console.log('addUnconfirmedTransaction:', txParams)
|
console.log('addUnconfirmedTransaction:', txParams)
|
||||||
|
|
||||||
// temp - just sign the tx
|
// temp - just sign the tx
|
||||||
// otherwise we need to keep the cb around
|
// otherwise we need to keep the cb around
|
||||||
// signTransaction(txId, cb)
|
// signTransaction(txId, cb)
|
||||||
@ -140,7 +140,7 @@ IdentityStore.prototype.sendTransaction = function(txId, cb){
|
|||||||
const self = this
|
const self = this
|
||||||
|
|
||||||
var txData = self._currentState.unconfTxs[txId]
|
var txData = self._currentState.unconfTxs[txId]
|
||||||
|
|
||||||
if (!txData || txData.status !== 'signed') {
|
if (!txData || txData.status !== 'signed') {
|
||||||
return cb(new Error('IdentityStore - Transaction not signed:', txId))
|
return cb(new Error('IdentityStore - Transaction not signed:', txId))
|
||||||
}
|
}
|
||||||
@ -164,7 +164,7 @@ IdentityStore.prototype.cancelTransaction = function(txId){
|
|||||||
|
|
||||||
var txData = self._currentState.unconfTxs[txId]
|
var txData = self._currentState.unconfTxs[txId]
|
||||||
delete self._currentState.unconfTxs[txId]
|
delete self._currentState.unconfTxs[txId]
|
||||||
self._didUpdate()
|
self._didUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -180,7 +180,7 @@ IdentityStore.prototype._signTransaction = function(password, txParams, cb){
|
|||||||
nonce: txParams.nonce,
|
nonce: txParams.nonce,
|
||||||
to: txParams.to,
|
to: txParams.to,
|
||||||
value: txParams.value,
|
value: txParams.value,
|
||||||
data: txParams.input,
|
data: txParams.data,
|
||||||
gasPrice: txParams.gasPrice,
|
gasPrice: txParams.gasPrice,
|
||||||
gasLimit: txParams.gas,
|
gasLimit: txParams.gas,
|
||||||
})
|
})
|
||||||
@ -288,4 +288,4 @@ IdentityStore.prototype._saveKeystore = function(keyStore){
|
|||||||
|
|
||||||
// util
|
// util
|
||||||
|
|
||||||
function noop(){}
|
function noop(){}
|
||||||
|
Loading…
Reference in New Issue
Block a user