aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorDan J Miller <danjm.com@gmail.com>2017-12-13 14:24:41 +0800
committerAlexander Tseung <alextsg@users.noreply.github.com>2017-12-13 14:24:41 +0800
commit339eb7d1a687f141e822c745c568063783d44f15 (patch)
tree41343d3e66a1f1862002158a02214fbf2cf8c6de /ui/app
parent68ef52e183c8564de83e7d8d41d90c5790f2c1be (diff)
downloadtangerine-wallet-browser-339eb7d1a687f141e822c745c568063783d44f15.tar
tangerine-wallet-browser-339eb7d1a687f141e822c745c568063783d44f15.tar.gz
tangerine-wallet-browser-339eb7d1a687f141e822c745c568063783d44f15.tar.bz2
tangerine-wallet-browser-339eb7d1a687f141e822c745c568063783d44f15.tar.lz
tangerine-wallet-browser-339eb7d1a687f141e822c745c568063783d44f15.tar.xz
tangerine-wallet-browser-339eb7d1a687f141e822c745c568063783d44f15.tar.zst
tangerine-wallet-browser-339eb7d1a687f141e822c745c568063783d44f15.zip
Fix edit to field bug. (#2738)
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/components/pending-tx/confirm-send-token.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/ui/app/components/pending-tx/confirm-send-token.js b/ui/app/components/pending-tx/confirm-send-token.js
index cc2df8299..727cd260b 100644
--- a/ui/app/components/pending-tx/confirm-send-token.js
+++ b/ui/app/components/pending-tx/confirm-send-token.js
@@ -67,15 +67,15 @@ function mapDispatchToProps (dispatch, ownProps) {
const { txParams, id } = txMeta
const tokenData = txParams.data && abiDecoder.decodeMethod(txParams.data)
const { params = [] } = tokenData
- const { value } = params[1] || {}
- const amount = conversionUtil(value, {
+ const { value: to } = params[0] || {}
+ const { value: tokenAmountInDec } = params[1] || {}
+ const tokenAmountInHex = conversionUtil(tokenAmountInDec, {
fromNumericBase: 'dec',
toNumericBase: 'hex',
})
const {
gas: gasLimit,
gasPrice,
- to,
} = txParams
dispatch(actions.setSelectedToken(address))
dispatch(actions.updateSend({
@@ -83,7 +83,7 @@ function mapDispatchToProps (dispatch, ownProps) {
gasPrice,
gasTotal: null,
to,
- amount,
+ amount: tokenAmountInHex,
errors: { to: null, amount: null },
editingTransactionId: id,
}))
@@ -446,10 +446,11 @@ ConfirmSendToken.prototype.gatherTxMeta = function () {
amount,
gasLimit: gas,
gasPrice,
+ to,
},
} = props
- const { txParams: { from, to } } = txData
+ const { txParams: { from, to: tokenAddress } } = txData
const tokenParams = {
from: ethUtil.addHexPrefix(from),
@@ -465,7 +466,7 @@ ConfirmSendToken.prototype.gatherTxMeta = function () {
txData.txParams = {
...tokenParams,
- to: ethUtil.addHexPrefix(to),
+ to: ethUtil.addHexPrefix(tokenAddress),
memo: memo && ethUtil.addHexPrefix(memo),
data,
}