mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 18:41:38 +01:00
Linted
This commit is contained in:
parent
57fec36a7d
commit
c4e9354575
@ -26,7 +26,6 @@ PTXP.render = function () {
|
||||
var props = this.props
|
||||
var state = this.state || {}
|
||||
var txData = state.txMeta || props.txData
|
||||
var state = this.state || {}
|
||||
|
||||
var txParams = txData.txParams || {}
|
||||
var address = txParams.from || props.selectedAddress
|
||||
@ -155,7 +154,7 @@ PTXP.render = function () {
|
||||
this.setState({ gas: newHex })
|
||||
},
|
||||
}),
|
||||
])
|
||||
]),
|
||||
]),
|
||||
h('.cell.row', {
|
||||
|
||||
@ -170,7 +169,7 @@ PTXP.render = function () {
|
||||
this.setState({ gasPrice: newHex })
|
||||
},
|
||||
}),
|
||||
])
|
||||
]),
|
||||
]),
|
||||
h('.cell.row', {
|
||||
style: {
|
||||
@ -275,11 +274,11 @@ PTXP.gatherParams = function () {
|
||||
|
||||
PTXP.calculateGas = function () {
|
||||
const txMeta = this.gatherParams()
|
||||
log.debug(`pending-tx-details calculating gas for ${ JSON.stringify(txMeta) }`)
|
||||
const txUtils = this.txUtils
|
||||
log.debug(`pending-tx-details calculating gas for ${JSON.stringify(txMeta)}`)
|
||||
this.txUtils.analyzeGasUsage(txMeta, (err, result) => {
|
||||
console.log('ANALYZED')
|
||||
console.dir(arguments)
|
||||
if (err) {
|
||||
return this.setState({ error: err })
|
||||
}
|
||||
const { txFee, maxCost } = result || txMeta
|
||||
if (txFee === txMeta.txFee && maxCost === txMeta.maxCost) {
|
||||
log.warn(`Recalculating gas resulted in no change.`)
|
||||
|
@ -12,12 +12,7 @@ function PendingTx () {
|
||||
|
||||
PendingTx.prototype.render = function () {
|
||||
const props = this.props
|
||||
const state = this.state || {}
|
||||
const txData = props.txData
|
||||
const txParams = txData.txParams
|
||||
|
||||
const gas = state.gas || txParams.gas
|
||||
const gasPrice = state.gasPrice || txData.gasPrice
|
||||
|
||||
return (
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user