aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send_/send.component.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-06-19 02:54:26 +0800
committerGitHub <noreply@github.com>2018-06-19 02:54:26 +0800
commit62df4463859bc6836608ecb0478da67456f15e73 (patch)
treeff2aa786ff4b9afa96bea11d0d90382d75312821 /ui/app/components/send_/send.component.js
parent9a7f363c2a8dcec041569c59e1b1a7c485515a33 (diff)
parent0c8318b02a5ccb11f5de43a8c9894873e29c2401 (diff)
downloadtangerine-wallet-browser-62df4463859bc6836608ecb0478da67456f15e73.tar.gz
tangerine-wallet-browser-62df4463859bc6836608ecb0478da67456f15e73.tar.zst
tangerine-wallet-browser-62df4463859bc6836608ecb0478da67456f15e73.zip
Merge pull request #4584 from MetaMask/fix-send-token
Add hex-prefix to gas estimate result
Diffstat (limited to 'ui/app/components/send_/send.component.js')
-rw-r--r--ui/app/components/send_/send.component.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/app/components/send_/send.component.js b/ui/app/components/send_/send.component.js
index 516251e22..219b362f2 100644
--- a/ui/app/components/send_/send.component.js
+++ b/ui/app/components/send_/send.component.js
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types'
import PersistentForm from '../../../lib/persistent-form'
import {
getAmountErrorObject,
+ getToAddressForGasUpdate,
doesAmountErrorRequireUpdate,
} from './send.utils'
@@ -38,7 +39,7 @@ export default class SendTransactionScreen extends PersistentForm {
updateSendTokenBalance: PropTypes.func,
};
- updateGas ({ to } = {}) {
+ updateGas ({ to: updatedToAddress, amount: value } = {}) {
const {
amount,
blockGasLimit,
@@ -48,6 +49,7 @@ export default class SendTransactionScreen extends PersistentForm {
recentBlocks,
selectedAddress,
selectedToken = {},
+ to: currentToAddress,
updateAndSetGasTotal,
} = this.props
@@ -59,8 +61,8 @@ export default class SendTransactionScreen extends PersistentForm {
recentBlocks,
selectedAddress,
selectedToken,
- to: to && to.toLowerCase(),
- value: amount,
+ to: getToAddressForGasUpdate(updatedToAddress, currentToAddress),
+ value: value || amount,
})
}