Gas exception warnings on deployment (#3938)

* add deployEstimateGas function

* Render gas warning with Warning component

* estimateGas, display warning on contract deploy

* Update messages

* Removed unused import

* Fix calculated gas usage

* Basic component smoktest

* Only display warning on edit steps
This commit is contained in:
Jaco Greeff
2016-12-23 16:42:48 +01:00
committed by Gav Wood
parent 9529b6fa8c
commit 466f84f485
8 changed files with 420 additions and 142 deletions

View File

@@ -30,6 +30,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import React, { Component, PropTypes } from 'react';
import { FormattedMessage } from 'react-intl';
import { Form, TypedInput } from '~/ui';
import { parseAbiType } from '~/util/abi';
@@ -77,21 +78,24 @@ export default class ParametersStep extends Component {
return (
<div key={ index } className={ styles.funcparams }>
<TypedInput
label={ label }
value={ value }
error={ error }
accounts={ accounts }
error={ error }
isEth={ false }
label={ label }
onChange={ onChange }
param={ param }
isEth={ false }
/>
value={ value } />
</div>
);
});
return (
<div>
<p>Choose the contract parameters</p>
<p>
<FormattedMessage
id='deployContract.parameters.choose'
defaultMessage='Choose the contract parameters' />
</p>
{ inputsComponents }
</div>
);