diff --git a/lib/modules/webserver/backend/contracts/components/function-form.js b/lib/modules/webserver/backend/contracts/components/function-form.js
index 43ca43d69..31cdd61ce 100644
--- a/lib/modules/webserver/backend/contracts/components/function-form.js
+++ b/lib/modules/webserver/backend/contracts/components/function-form.js
@@ -89,7 +89,35 @@ class FunctionForm extends React.Component {
{
!this.state.error && this.state.message != null
?
- {this.state.message}
+ {
+ (this.state.message !== null && typeof this.state.message === 'object')
+ ?
+ (
+
+ {
+ this.props.abi.outputs.filter(x => x.name !== "").length > 0
+ ?
+ Object.keys(this.state.message).map((key, index) => {
+ if(isNaN(key)){
+ return - {key}: {this.state.message[key]}
+ } else {
+ return '';
+ }
+ })
+ :
+ Object.keys(this.state.message).map((key, index) => {
+ return - {key}: {this.state.message[key]}
+ })
+
+ }
+
+ )
+ :
+ (typeof this.state.message === "boolean" ?
+ (this.state.message ? 'true' : 'false')
+ :
+ this.state.message)
+ }
: '' }
diff --git a/lib/modules/webserver/backend/contracts/components/function.js b/lib/modules/webserver/backend/contracts/components/function.js
index 37ff4442e..337fbf069 100644
--- a/lib/modules/webserver/backend/contracts/components/function.js
+++ b/lib/modules/webserver/backend/contracts/components/function.js
@@ -86,11 +86,14 @@ class Function extends React.Component {
} else {
if(this.props.abi.type == 'fallback')
- _receipt = await this.web3.eth.sendTransaction(executionParams);
+ _receipt = await web3.eth.sendTransaction(executionParams);
else
_receipt = await this.props.contract
.methods[this.props.abi.name + '(' + this.props.abi.inputs.map(input => input.type).join(',') + ')']
- .apply(null, Object.keys(fields).map(val => fields[val]))
+ .apply(null, Object.keys(fields).map(val => {
+ let input = this.props.abi.inputs.filter(x => x.name == val)[0];
+ return input.type.indexOf('bool') == -1 ? fields[val] : (fields[val].toLowerCase() === 'true')
+ }))
[this._getMethodType()](executionParams)
if(this._getMethodType() == 'call'){
@@ -196,7 +199,7 @@ class Function extends React.Component {
_getFunctionParamString(){
if(this.props.abi.type == 'fallback') return '';
return this.props.abi.inputs
- .map((input, i) => (input.type.indexOf('int') == -1 ? '"' : '') + (this.state.fields[input.name] || (input.type.indexOf('int') == -1 ? '' : '0')) + (input.type.indexOf('int') == -1 ? '"' : ''))
+ .map((input, i) => (input.type.indexOf('int') == -1 && input.type.indexOf('bool') == -1 ? '"' : '') + (this.state.fields[input.name] || (input.type.indexOf('int') == -1 ? '' : '0')) + (input.type.indexOf('int') == -1 ? '"' : ''))
.join(', ');
}