Merge pull request #319 from poanetwork/vb-check-state-mutability

Check stateMutability prop to define if this is reading method
This commit is contained in:
Victor Baranov 2020-02-27 18:36:21 +03:00 committed by GitHub
commit 7e40ea91b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -161,9 +161,10 @@ class SendTransactionScreen extends PersistentForm {
options={this.state.options}
style={{ marginBottom: '10px' }}
onChange={(opt) => {
const isConstantMethod = opt.metadata && (opt.metadata.constant || opt.metadata.stateMutability === 'view')
this.setState({
methodSelected: opt.value,
isConstantMethod: opt.metadata.constant,
isConstantMethod: isConstantMethod,
methodABI: opt.metadata,
outputValues: {},
inputValues: {},