aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-03-01 06:08:00 +0800
committerDan Finlay <dan@danfinlay.com>2017-03-01 06:08:00 +0800
commitda88481560f0f2ad7e12b3e94082aa10147b900e (patch)
treed90c02a55451768807babb49ef95519d44f93e1c /ui
parent5a74c0fcad92cf4192eefedcb092d4525157902f (diff)
downloadtangerine-wallet-browser-da88481560f0f2ad7e12b3e94082aa10147b900e.tar
tangerine-wallet-browser-da88481560f0f2ad7e12b3e94082aa10147b900e.tar.gz
tangerine-wallet-browser-da88481560f0f2ad7e12b3e94082aa10147b900e.tar.bz2
tangerine-wallet-browser-da88481560f0f2ad7e12b3e94082aa10147b900e.tar.lz
tangerine-wallet-browser-da88481560f0f2ad7e12b3e94082aa10147b900e.tar.xz
tangerine-wallet-browser-da88481560f0f2ad7e12b3e94082aa10147b900e.tar.zst
tangerine-wallet-browser-da88481560f0f2ad7e12b3e94082aa10147b900e.zip
Remove gasMultiplier txMeta param
This was used by the custom gas slider on the `send` screen, and it was used to modify the gas value before sending it out, breaking our new custom gas field logic. Removed it and the logic that referred to this now-outdated parameter.
Diffstat (limited to 'ui')
-rw-r--r--ui/app/actions.js14
-rw-r--r--ui/app/components/pending-tx-details.js6
-rw-r--r--ui/app/send.js71
3 files changed, 7 insertions, 84 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index b9169a106..8177696f1 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -388,17 +388,13 @@ function signPersonalMsg (msgData) {
function signTx (txData) {
return (dispatch) => {
- log.debug(`background.setGasMultiplier`)
- background.setGasMultiplier(txData.gasMultiplier, (err) => {
+ web3.eth.sendTransaction(txData, (err, data) => {
+ dispatch(actions.hideLoadingIndication())
if (err) return dispatch(actions.displayWarning(err.message))
- web3.eth.sendTransaction(txData, (err, data) => {
- dispatch(actions.hideLoadingIndication())
- if (err) return dispatch(actions.displayWarning(err.message))
- dispatch(actions.hideWarning())
- dispatch(actions.goHome())
- })
- dispatch(this.showConfTxPage())
+ dispatch(actions.hideWarning())
+ dispatch(actions.goHome())
})
+ dispatch(this.showConfTxPage())
}
}
diff --git a/ui/app/components/pending-tx-details.js b/ui/app/components/pending-tx-details.js
index 643e69902..f5651bb1d 100644
--- a/ui/app/components/pending-tx-details.js
+++ b/ui/app/components/pending-tx-details.js
@@ -248,13 +248,11 @@ PTXP.miniAccountPanelForRecipient = function () {
}
PTXP.componentDidUpdate = function (prevProps, previousState) {
+ log.debug(`pending-tx-details componentDidUpdate`)
const state = this.state || {}
const prevState = previousState || {}
const { gas, gasPrice } = state
- log.debug(`pending-tx-details componentDidUpdate`)
- console.log(arguments)
-
// Only if gas or gasPrice changed:
if (!prevState ||
(gas !== prevState.gas ||
@@ -269,10 +267,8 @@ PTXP.calculateGas = function () {
log.debug(`pending-tx-details calculating gas for ${JSON.stringify(txMeta)}`)
var txParams = txMeta.txParams
- var gasMultiplier = txMeta.gasMultiplier
var gasCost = new BN(ethUtil.stripHexPrefix(txParams.gas || txMeta.estimatedGas), 16)
var gasPrice = new BN(ethUtil.stripHexPrefix(txParams.gasPrice || '0x4a817c800'), 16)
- gasPrice = gasPrice.mul(new BN(gasMultiplier * 100), 10).div(new BN(100, 10))
var txFee = gasCost.mul(gasPrice)
var txValue = new BN(ethUtil.stripHexPrefix(txParams.value || '0x0'), 16)
var maxCost = txValue.add(txFee)
diff --git a/ui/app/send.js b/ui/app/send.js
index d16270b41..752eed15a 100644
--- a/ui/app/send.js
+++ b/ui/app/send.js
@@ -208,73 +208,6 @@ SendTransactionScreen.prototype.render = function () {
},
}),
]),
- // custom gasPrice field
- h('h3.flex-center.text-transform-uppercase', {
- style: {
- background: '#EBEBEB',
- color: '#AEAEAE',
- marginBottom: '5px',
- },
- }, [
- 'Transaction Fee (optional)',
- h(Tooltip, {
- title: `
- This is used to set the transaction's gas price.
- Setting it to 100% will use the full recommended value. `,
- }, [
- h('i.fa.fa-question-circle', {
- style: {
- marginLeft: '5px',
- },
- }),
- ]),
- ]),
-
- h('section.flex-column.flex-center', [
- h('.flex-row', [
- h(RangeSlider, {
- name: 'gasInput',
- options: {
- mirrorInput: true,
- defaultValue: 100,
- min: 80,
- max: 220,
- },
- style: {
- container: {
- marginBottom: '16px',
- },
- range: {
- width: '68vw',
- },
- input: {
- width: '5em',
- marginLeft: '5px',
- },
- },
- }),
-
- h('div', {
- style: {
- fontSize: '12px',
- paddingTop: '8px',
- paddingLeft: '5px',
- },
- }, '%'),
- ]),
- h('.flex-row', {
- style: {
- justifyContent: 'space-between',
- width: '243px',
- position: 'relative',
- fontSize: '12px',
- right: '42px',
- bottom: '30px',
- },
- }, [
- h('span', 'Cheaper'), h('span', 'Faster'),
- ]),
- ]),
])
)
}
@@ -289,12 +222,11 @@ SendTransactionScreen.prototype.back = function () {
this.props.dispatch(actions.backToAccountDetail(address))
}
-SendTransactionScreen.prototype.onSubmit = function (gasPrice) {
+SendTransactionScreen.prototype.onSubmit = function () {
const recipient = document.querySelector('input[name="address"]').value
const input = document.querySelector('input[name="amount"]').value
const value = util.normalizeEthStringToWei(input)
const txData = document.querySelector('input[name="txData"]').value
- const gasMultiplier = document.querySelector('input[name="gasInput"]').value
const balance = this.props.balance
let message
@@ -323,7 +255,6 @@ SendTransactionScreen.prototype.onSubmit = function (gasPrice) {
var txParams = {
from: this.props.address,
value: '0x' + value.toString(16),
- gasMultiplier: gasMultiplier * 0.01,
}
if (recipient) txParams.to = ethUtil.addHexPrefix(recipient)