aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send_/send-content/send-to-row/send-to-row.component.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/send_/send-content/send-to-row/send-to-row.component.js')
-rw-r--r--ui/app/components/send_/send-content/send-to-row/send-to-row.component.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/ui/app/components/send_/send-content/send-to-row/send-to-row.component.js b/ui/app/components/send_/send-content/send-to-row/send-to-row.component.js
index 901ae97e9..0a83186a5 100644
--- a/ui/app/components/send_/send-content/send-to-row/send-to-row.component.js
+++ b/ui/app/components/send_/send-content/send-to-row/send-to-row.component.js
@@ -2,6 +2,7 @@ import React, { Component } from 'react'
import PropTypes from 'prop-types'
import SendRowWrapper from '../send-row-wrapper/'
import EnsInput from '../../../ens-input'
+import { getToErrorObject } from './send-to-row.utils.js'
export default class SendToRow extends Component {
@@ -13,14 +14,19 @@ export default class SendToRow extends Component {
to: PropTypes.string,
toAccounts: PropTypes.array,
toDropdownOpen: PropTypes.bool,
+ updateGas: PropTypes.func,
updateSendTo: PropTypes.func,
updateSendToError: PropTypes.func,
};
handleToChange (to, nickname = '') {
- const { updateSendTo, updateSendToError } = this.props
+ const { updateSendTo, updateSendToError, updateGas } = this.props
+ const toErrorObject = getToErrorObject(to)
updateSendTo(to, nickname)
- updateSendToError(to)
+ updateSendToError(toErrorObject)
+ if (toErrorObject.to === null) {
+ updateGas({ to })
+ }
}
render () {