use method `.call` only for the read methods

- review screen then will attempt to evaluate the validity of the write method
This commit is contained in:
fernandomg 2020-06-02 09:04:29 -03:00
parent adfbcdfd19
commit b07f0e90d9
1 changed files with 1 additions and 1 deletions

View File

@ -38,9 +38,9 @@ const ContractInteraction = ({ contractAddress, initialValues, onClose, onNext }
try {
const txObject = createTxObject(selectedMethod, contractAddress, values)
const data = txObject.encodeABI()
const result = await txObject.call({ from: safeAddress })
if (isReadMethod(selectedMethod)) {
const result = await txObject.call({ from: safeAddress })
setCallResults(result)
// this was a read method, so we won't go to the 'review' screen