From 10fcf7f0516a1823ed074ecb57086608915c66ff Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Mon, 31 Oct 2016 14:59:02 +0100 Subject: [PATCH] Allow empty input arrays for ABIs (#3001) --- js/src/modals/ExecuteContract/DetailsStep/detailsStep.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js b/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js index 6aab34e7a..33d23fe5c 100644 --- a/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js +++ b/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js @@ -74,7 +74,7 @@ export default class DetailsStep extends Component { .filter((func) => !func.constant) .sort((a, b) => a.name.localeCompare(b.name)) .map((func) => { - const params = func.abi.inputs + const params = (func.abi.inputs || []) .map((input, index) => { return ( @@ -97,7 +97,7 @@ export default class DetailsStep extends Component { + label={ func.name || '()' }> { name } ); @@ -122,7 +122,7 @@ export default class DetailsStep extends Component { return null; } - return func.abi.inputs.map((input, index) => { + return (func.abi.inputs || []).map((input, index) => { const onChange = (event, value) => onValueChange(event, index, value); const onSubmit = (value) => onValueChange(null, index, value); const label = `${input.name}: ${input.type}`;