}
disableSubmit(actions, normalTransaction) {
+ if (!this.state.showAdvanceTx) {
+ return !this.state.estimateGas
+ }
+
if (this.state.showAdvanceTx) {
return actions.length == 0 && !this.state.showAdvanced
}
const body = {actions, ttl: 1}
this.connection.request('/build-transaction', body).then(resp => {
if (resp.status === 'fail') {
+ this.setState({estimateGas: null})
this.props.showError(new Error(resp.msg))
return
}
transactionTemplate: resp.data
}).then(resp => {
if (resp.status === 'fail') {
+ this.setState({estimateGas: null})
this.props.showError(new Error(resp.msg))
return
}