From 3ead7f5bcb5920b5ca8097b0706cba80bb573c3b Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 31 Jan 2020 09:52:16 +0100 Subject: [PATCH] fix log message: call vs transact --- src/app/ui/universal-dapp-ui.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/app/ui/universal-dapp-ui.js b/src/app/ui/universal-dapp-ui.js index af1aa339f3..990d96b079 100644 --- a/src/app/ui/universal-dapp-ui.js +++ b/src/app/ui/universal-dapp-ui.js @@ -211,7 +211,8 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address UniversalDAppUI.prototype.getCallButton = function (args) { let self = this var outputOverride = yo`
` // show return value - const lookupOnly = args.funABI.stateMutability === 'view' || args.funABI.stateMutability === 'pure' || args.funABI.constant + const isConstant = args.funABI.constant !== undefined ? args.funABI.constant : false + const lookupOnly = args.funABI.stateMutability === 'view' || args.funABI.stateMutability === 'pure' || isConstant const multiParamManager = new MultiParamManager( lookupOnly, args.funABI, @@ -227,13 +228,8 @@ UniversalDAppUI.prototype.getCallButton = function (args) { UniversalDAppUI.prototype.runTransaction = function (lookupOnly, args, valArr, inputsValues, outputOverride) { let self = this - let logMsg const functionName = args.funABI.type === 'function' ? args.funABI.name : `(${args.funABI.type})` - if (!lookupOnly) { - logMsg = `call to ${args.contractName}.${functionName}` - } else { - logMsg = `transact to ${args.contractName}.${functionName}` - } + const logMsg = `${lookupOnly ? 'call' : 'transact'} to ${args.contractName}.${functionName}` var value = inputsValues