aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/conf-tx.js
diff options
context:
space:
mode:
authorDan Finlay <flyswatter@users.noreply.github.com>2017-03-29 05:50:55 +0800
committerGitHub <noreply@github.com>2017-03-29 05:50:55 +0800
commita3e08d779ecc81ebddf8609130eae5e6db08ad48 (patch)
tree1692e346c343b3b2f9823ff0626d11e961cf5484 /ui/app/conf-tx.js
parent67892c49a6cb26e433e3dbeaa9f2f7790667f103 (diff)
parentd1733c1f7521d17b0e8acdae5a2be33c1a9bbd5c (diff)
downloadtangerine-wallet-browser-a3e08d779ecc81ebddf8609130eae5e6db08ad48.tar
tangerine-wallet-browser-a3e08d779ecc81ebddf8609130eae5e6db08ad48.tar.gz
tangerine-wallet-browser-a3e08d779ecc81ebddf8609130eae5e6db08ad48.tar.bz2
tangerine-wallet-browser-a3e08d779ecc81ebddf8609130eae5e6db08ad48.tar.lz
tangerine-wallet-browser-a3e08d779ecc81ebddf8609130eae5e6db08ad48.tar.xz
tangerine-wallet-browser-a3e08d779ecc81ebddf8609130eae5e6db08ad48.tar.zst
tangerine-wallet-browser-a3e08d779ecc81ebddf8609130eae5e6db08ad48.zip
Merge branch 'master' into kovan-faucet-instructions
Diffstat (limited to 'ui/app/conf-tx.js')
-rw-r--r--ui/app/conf-tx.js30
1 files changed, 1 insertions, 29 deletions
diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js
index 54c171a8a..3b8618992 100644
--- a/ui/app/conf-tx.js
+++ b/ui/app/conf-tx.js
@@ -7,8 +7,6 @@ const actions = require('./actions')
const NetworkIndicator = require('./components/network')
const txHelper = require('../lib/tx-helper')
const isPopupOrNotification = require('../../app/scripts/lib/is-popup-or-notification')
-const ethUtil = require('ethereumjs-util')
-const BN = ethUtil.BN
const PendingTx = require('./components/pending-tx')
const PendingMsg = require('./components/pending-msg')
@@ -104,9 +102,6 @@ ConfirmTxScreen.prototype.render = function () {
selectedAddress: props.selectedAddress,
accounts: props.accounts,
identities: props.identities,
- insufficientBalance: this.checkBalanceAgainstTx(txData),
- // State actions
- onTxChange: this.onTxChange.bind(this),
// Actions
buyEth: this.buyEth.bind(this, txParams.from || props.selectedAddress),
sendTransaction: this.sendTransaction.bind(this, txData),
@@ -145,37 +140,14 @@ function currentTxView (opts) {
}
}
-ConfirmTxScreen.prototype.checkBalanceAgainstTx = function (txData) {
- if (!txData.txParams) return false
- var props = this.props
- var address = txData.txParams.from || props.selectedAddress
- var account = props.accounts[address]
- var balance = account ? account.balance : '0x0'
- var maxCost = new BN(txData.maxCost, 16)
-
- var balanceBn = new BN(ethUtil.stripHexPrefix(balance), 16)
- return maxCost.gt(balanceBn)
-}
-
ConfirmTxScreen.prototype.buyEth = function (address, event) {
this.stopPropagation(event)
this.props.dispatch(actions.buyEthView(address))
}
-// Allows the detail view to update the gas calculations,
-// for manual gas controls.
-ConfirmTxScreen.prototype.onTxChange = function (txData) {
- log.debug(`conf-tx onTxChange triggered with ${JSON.stringify(txData)}`)
- this.setState({ txData })
-}
-
-// Must default to any local state txData,
-// to allow manual override of gas calculations.
ConfirmTxScreen.prototype.sendTransaction = function (txData, event) {
this.stopPropagation(event)
- const state = this.state || {}
- const txMeta = state.txData
- this.props.dispatch(actions.updateAndApproveTx(txMeta || txData))
+ this.props.dispatch(actions.updateAndApproveTx(txData))
}
ConfirmTxScreen.prototype.cancelTransaction = function (txData, event) {