diff --git a/js/src/modals/ExecuteContract/executeContract.js b/js/src/modals/ExecuteContract/executeContract.js index 67f350feb..e0462982d 100644 --- a/js/src/modals/ExecuteContract/executeContract.js +++ b/js/src/modals/ExecuteContract/executeContract.js @@ -19,7 +19,7 @@ import ActionDoneAll from 'material-ui/svg-icons/action/done-all'; import ContentClear from 'material-ui/svg-icons/content/clear'; import { BusyStep, CompletedStep, Button, IdentityIcon, Modal, TxHash } from '../../ui'; -import { validateAddress } from '../../util/validation'; +import { validateAddress, validateUint } from '../../util/validation'; import DetailsStep from './DetailsStep'; @@ -41,6 +41,7 @@ export default class ExecuteContract extends Component { state = { amount: '0', amountError: null, + fromAddressError: null, func: null, funcError: null, values: [], @@ -77,7 +78,8 @@ export default class ExecuteContract extends Component { renderDialogActions () { const { onClose, fromAddress } = this.props; - const { sending, step } = this.state; + const { sending, step, fromAddressError, valuesError } = this.state; + const hasError = fromAddressError || valuesError.find((error) => error); const cancelBtn = (