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}
|
options={this.state.options}
|
||||||
style={{ marginBottom: '10px' }}
|
style={{ marginBottom: '10px' }}
|
||||||
onChange={(opt) => {
|
onChange={(opt) => {
|
||||||
|
const isConstantMethod = opt.metadata && (opt.metadata.constant || opt.metadata.stateMutability === 'view')
|
||||||
this.setState({
|
this.setState({
|
||||||
methodSelected: opt.value,
|
methodSelected: opt.value,
|
||||||
isConstantMethod: opt.metadata.constant,
|
isConstantMethod: isConstantMethod,
|
||||||
methodABI: opt.metadata,
|
methodABI: opt.metadata,
|
||||||
outputValues: {},
|
outputValues: {},
|
||||||
inputValues: {},
|
inputValues: {},
|
||||||
|
|
Loading…
Reference in New Issue