From 69281c00ca7be2dc2827827b9c945258249bfcca Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 27 Feb 2020 18:12:09 +0300 Subject: [PATCH] Check stateMutability prop to define if this is reading method --- old-ui/app/components/send/send-contract.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/old-ui/app/components/send/send-contract.js b/old-ui/app/components/send/send-contract.js index 36c1f715e..285ce8719 100644 --- a/old-ui/app/components/send/send-contract.js +++ b/old-ui/app/components/send/send-contract.js @@ -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: {},