aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/send.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-08-29 20:51:31 +0800
committerDan <danjm.com@gmail.com>2017-08-29 22:56:33 +0800
commitcd5861541c1cb871d5e3b606501931f2aee0d048 (patch)
tree944191dd0528f03b771c7c93ed2b7c5775bab879 /ui/app/send.js
parentcd351e8aef59f314c170d0436d98aaf111db1c00 (diff)
downloadtangerine-wallet-browser-cd5861541c1cb871d5e3b606501931f2aee0d048.tar
tangerine-wallet-browser-cd5861541c1cb871d5e3b606501931f2aee0d048.tar.gz
tangerine-wallet-browser-cd5861541c1cb871d5e3b606501931f2aee0d048.tar.bz2
tangerine-wallet-browser-cd5861541c1cb871d5e3b606501931f2aee0d048.tar.lz
tangerine-wallet-browser-cd5861541c1cb871d5e3b606501931f2aee0d048.tar.xz
tangerine-wallet-browser-cd5861541c1cb871d5e3b606501931f2aee0d048.tar.zst
tangerine-wallet-browser-cd5861541c1cb871d5e3b606501931f2aee0d048.zip
Use hex values only in send.js to handle limit and price; GasTooltip accepts and returns values as hex (allows user to enter floats)
Diffstat (limited to 'ui/app/send.js')
-rw-r--r--ui/app/send.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/ui/app/send.js b/ui/app/send.js
index f50af386c..23216d54c 100644
--- a/ui/app/send.js
+++ b/ui/app/send.js
@@ -58,7 +58,7 @@ function SendTransactionScreen () {
to: '',
// these values are hardcoded, so "Next" can be clicked
amount: '0.0001', // see L544
- gasPrice: '0x19',
+ gasPrice: '0x5d21dba00',
gas: '0x7b0d',
txData: null,
memo: '',
@@ -92,7 +92,8 @@ SendTransactionScreen.prototype.render = function () {
conversionRate,
currentCurrency,
} = props
- const { blockGasLimit } = this.state
+ const { blockGasLimit, newTx } = this.state
+ const { gas, gasPrice } = newTx
console.log({ selectedIdentity, identities })
console.log("SendTransactionScreen state:", this.state)
@@ -245,7 +246,7 @@ SendTransactionScreen.prototype.render = function () {
h('div.large-input.send-screen-gas-input', {}, [
currentCurrency === 'USD'
? h(FiatValue, {
- value: getTxFeeBn(this.state.newTx.gas.toString(16), this.state.newTx.gasPrice.toString(16), blockGasLimit).toString(16),
+ value: getTxFeeBn(gas, gasPrice, blockGasLimit),
conversionRate,
currentCurrency,
style: {
@@ -256,7 +257,7 @@ SendTransactionScreen.prototype.render = function () {
}
})
: h(EthBalance, {
- value: getTxFeeBn(this.state.newTx.gas.toString(16), this.state.newTx.gasPrice.toString(16), blockGasLimit).toString(16),
+ value: getTxFeeBn(gas, gasPrice, blockGasLimit),
currentCurrency,
conversionRate,
showFiat: false,
@@ -277,8 +278,8 @@ SendTransactionScreen.prototype.render = function () {
this.state.tooltipIsOpen && h(GasTooltip, {
className: 'send-tooltip',
- gasPrice: parseInt(this.state.newTx.gasPrice, 16),
- gasLimit: parseInt(this.state.newTx.gas, 16),
+ gasPrice,
+ gasLimit: gas,
onClose: this.closeTooltip,
onFeeChange: ({gasLimit, gasPrice}) => {
this.setState({