Check stateMutability prop to define if this is reading method
This commit is contained in:
parent
8d86a60a24
commit
69281c00ca
|
@ -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: {},
|
||||
|
|
Loading…
Reference in New Issue