diff options
author | Dan Finlay <dan@danfinlay.com> | 2017-02-28 08:09:05 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2017-02-28 08:09:46 +0800 |
commit | c4e935457589b9bb503a430906515b48a24a6d3d (patch) | |
tree | b065751862ac09524f384666b5a5c5acca1c1734 /ui | |
parent | 57fec36a7d999e4fdfc06e0b1f8649ec39d7eed4 (diff) | |
download | tangerine-wallet-browser-c4e935457589b9bb503a430906515b48a24a6d3d.tar tangerine-wallet-browser-c4e935457589b9bb503a430906515b48a24a6d3d.tar.gz tangerine-wallet-browser-c4e935457589b9bb503a430906515b48a24a6d3d.tar.bz2 tangerine-wallet-browser-c4e935457589b9bb503a430906515b48a24a6d3d.tar.lz tangerine-wallet-browser-c4e935457589b9bb503a430906515b48a24a6d3d.tar.xz tangerine-wallet-browser-c4e935457589b9bb503a430906515b48a24a6d3d.tar.zst tangerine-wallet-browser-c4e935457589b9bb503a430906515b48a24a6d3d.zip |
Linted
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/components/pending-tx-details.js | 13 | ||||
-rw-r--r-- | ui/app/components/pending-tx.js | 5 |
2 files changed, 6 insertions, 12 deletions
diff --git a/ui/app/components/pending-tx-details.js b/ui/app/components/pending-tx-details.js index a4ca2d32b..c82a46328 100644 --- a/ui/app/components/pending-tx-details.js +++ b/ui/app/components/pending-tx-details.js @@ -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.`) diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js index 23b0dc00f..3c898edec 100644 --- a/ui/app/components/pending-tx.js +++ b/ui/app/components/pending-tx.js @@ -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 ( |